LabVIEW Idea Exchange

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

Create SUB-VI from selection should intelligently inherit control names

Status: New

When you select a portion of code to create a sub vi, the logic that names the contorls on the sub-vi makes some bad choices.  For example:

 

 before subvi.png

 

In the block diagram above, the selected portion of code will be used to create the sub-vi.

The resulting sub-vi front panel looks like this:

 

generated subvi.png 

 

Notice that the input control inherited the name of the control from the parent but the output did not.  Also note that the error output control inherited the name of the output from the sub-vi inside the new sub-vi, but the input error did not and ends up with the name 'error out 2'.  This of course would NEVER be the right name for this control.

 

It would be a lot smarter if the new sub-VI inputs would inherit their names from the inputs of the functions inside the sub-vi since that more accurately describes what they will do with those controls.  Also, I think the output indicators should inherit their names from the original destinations in the parent VI since that more accurately describes the data they will contain once the sub-vi executes.

 

The current behavior seems to be exactly the opposite of what a developer would want. 

-John
------------------------
Certified LabVIEW Architect
2 Comments
JackDunaway
Trusted Enthusiast
jlokanis
Active Participant

Yes, that one points to the same issue but I think my suggested solution is much better because it tries to get at the intent of the developer and is language agnostic.  Also, the description in the other entry is not correct, as it is the error input that is always labeled wrong.

 

Any, I have pictures in mine so people will actually read it!  😉 

-John
------------------------
Certified LabVIEW Architect