From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mads

Propagating type definition /Replace type all along wire

Status: New

Imagine that you have made lots of code, wiring up several VI etc. all with the same data, a cluster for example, going in and out. Now you regret not having defined that wire as a typedef. Today replacing the data with a typedef will involve a lot of steps; you start by clicking on one of the controls or indicators, and create a typedef...then you need to do the tedious work of replacing all the other controls and indicators up- and downstream. 

 

Would it not be nice if you could just right-click on the wire and select "Define type"/"Create type definition" or "Replace with type def/class"  - and then choose to have the type definition automatically replace everything along the wire ("propagating type def")?

 

This idea was inspired by and first came about as a comment to this idea by cowen71.

3 Comments
Mads
Active Participant

This is I'm sure doable today by developing a shortcut menu plugin (perhaps someone is up for the task or have done it already(!?)), but it would be nice to have it as an in-built functionality.

X.
Trusted Enthusiast
Trusted Enthusiast

You probably should get used to define anything that is not a base type as a typedef. Or vote for the idea that suggested that this is done automatically.

Mads
Active Participant

Sure, that's the ideal, but even if you did - or it was done automatically, you still do not get the functionality to do a swift and targeted replace-operation along the length of a wire. (You could use the search and replace function, choose your current type def, select all the instances you want from the search list, and then do a replace...but thats quite a few steps. I'm talking cases where you do not want to just edit the associated type-def of course, then it's already simple.)

 

The idea will also work if you did not type-define it earlier on because you were using a base-type.