LabVIEW Idea Exchange

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

Quick rename of SubVI connectors

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

First of all - if there's a QuickDrop shortcut or any other feature within LabVIEW that already does what I suggest here, I'll be glad to be pointed the way to it. Thanks.

--------

During testing of programming appoaches I often code a bunch of stuff that should simply work and then break it down later into several SubVIs for better readability, maintainability and reusability. Doing so leaves me with the fact that LabVIEW determines

  • names
  • positions on the connector

of controls and indicators of the newly created SubVI by itself, e.g. like this:

 

SubVIctrlNames#1.png

 

So now, to get things organized, I open up the new SubVI and start renaming all the controls and indicators and repositioning their respective connectors to my heart's desire. This can get a little tricky as LabVIEW generally chooses quite ambiguous names for the connected FP elements, as can be seen in the picture above. So what I do now is open the caller of the SubVI and the SubVI side by side to identify the in-/outgoing wires with their respective names and connectors and modify them to get everything straight.

 

My idea therefore is to insert additional shortcut menu entries for renaming and swapping position of SubVI connectors, just like "Create >" or "Replace >" (see picture below)

 

SubVIctrlNamesRTM.png

 

The renaming could probably be done via QD - type the new name for the connected control/indicator in the QD text field, press the desired shortcut - done.

The swapping could possibly be easier to get implemented using the functionality the connector block of a VI (and several function nodes) features natively - CTRL+mouse click activates swap mode.

 

Glad to hear your opinions on this.

Falk

Berlin/Germany

 

5 Comments
P@Anand
Trusted Enthusiast

As far as naming the control, you already have it in LabVIEW (I have checked only with LabVIEW2013). Create Lables for the top most wires for which the controls will get created when a Sub VI creation is called out (Right click wire>Visible item>Label). This Label will be applied to the controls and indicators when a sub VI is created from selection.

On swaping and auto selecting termianls there are many ideas floating around (Sorry I am unable to provide the link of those)

-----

The best solution is the one you find it by yourself
comrade
Active Participant

Thanks for this input on wire labels. I knew about the wire labels but not that they would cause the controls to be named according to them. However, while wire labels may improve the BD style and readability, they tend to fill up the BD and get in the way. Therefore I'd still like the addition to the shortcut menu or a QD solution.

 

As for the existing ideas on swapping connector terminals - I'd be glad to read them. So far my search prior to posting my idea yielded zero results.

tst
Knight of NI Knight of NI
Knight of NI

I don't know if you'll like this, but you might want to look at <LabVIEW>\resource\plugins\CreateSubVI\ModifyNewSubVI.vi

 

This is what's called when the edit action is performed and it sets up the subVI. You could replace it entirely or you could modify the additional actions template VI to run your own code at the end. This should allow you to open a dialog as soon as the subVI is created, in which you can get any feedback you want from the user and use it to modify the subVI. I expect it would be more work than you would want, but that depends on how often you do this.


___________________
Try to take over the world!
comrade
Active Participant

Cool! Whenever there is time...Smiley Very Happy

 

Besides - just found this VI within:

<LabVIEW>\resource\plugins\CreateSubVI\Clean Up Panel.vi - this would be a good place to put the "MoveLabelToDefaultLocation" method that seems to be missing here

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.