LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting the local variable list

When a local variable is created on the block diagram and you decide you want it to be linked to a different control, you click and then change the name to another existing control or indicator. Is there any way to sort the list of available local variables that appears?

Currently I have a screen with 1600x1200 resolution, so when I click a local variable to see the list of others that are available, I can see about 80 out of the 100 total controls/indicators on the front panel (for the program I am currently working on). These are not sorted because they get added to the list in the order of creation. Due to tab controls, this is semi-permanent because I can reorder controls only that are not found on a tab. My only other option
is to sort by deleting the control or indicator and pasting it back so it appears at the bottom of the list, then rewiring everything that got broke.

Any ideas?
0 Kudos
Message 1 of 7
(3,235 Views)
Hello,

your question sounds like you don't know how to rearrange controls in a tab control. Here's a little explanation on how to do it.

Hope this helps !
Julien
Message 2 of 7
(3,235 Views)
m3nth;

I think what you are saying (sorting the local variable list) is a good suggestion. I don't know if that is something already included in the latest version of LabVIEW, but if not, in some instances can improve development efficiency.

You can submit your idea to NI. You may want to post it first at the LAVA Forums Wish List section, so you can have good feedback from other LabVIEW users.

As for additional ideas on how to overcome the difficulty you are experience, you can create the local variable directly from the control/indicator you wish to link to. Right-click the control/
indicator terminal in the diagram window and select "Create -> Local Variable".

Regards;
Enrique
www.vartortech.com
Message 3 of 7
(3,235 Views)
All controls and indicators on the front panel of a VI are selectable from a list when clicking a local variable on the block diagram. The list is what I want to know how to sort. Once tab controls are created the order of that list is no longer based on the order of the controls on the front panel, because some of those controls fall under the tab they are placed on. Rearranging the controls on the tab or on the front panel does not necessarily rearrange the order listed in the popup menu on the block diagram when selecting a local variable.
0 Kudos
Message 4 of 7
(3,235 Views)
Thanks for the links. Creating the local from the indicator is usually what I wind up having to do because I can't see it on the list of 100 local variables I have (!). Usually I just want to copy some code, for example calling an event, then change the local variable for the user event that's being called. While my naming convention for these means they all start with "EVT_" + whatever, they are spread out amongst many items and cannot be sorted. This is also a big issue when selecting event occurences for a control... the control selection box is so tiny and then I basically have to read every single one which can take several minutes sometimes... very frustrating.
0 Kudos
Message 5 of 7
(3,235 Views)
It sounds like your code is a nightmare, even without that sorting issue. Are you sure there is not a more elegant way to do all this?

Especially since you seem to mostly want to write to controls triggered by their events, couldn't you use value property writes? The correct control reference is conveniently available inside the event structure.

Maybe I don't quite understand exactly what you are trying to do.
Message 6 of 7
(3,235 Views)
First of all, yeah... the code is large and nightmarish at times, but LabVIEW has come a long way from what it used to be, so it is at least feasible and understandable with good coding practices.

Second, I don't in particular "want to write to controls triggered by their events". Good point if that was the case though.
0 Kudos
Message 7 of 7
(3,235 Views)