LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Group Commands

Here is a suggestion for a new capability in the next version of LabVIEW.
 
Perhaps there could be an ability to perform a command on a group of similar controls or functions? At times I find much development time is spent on repeating a similar operation on multiple objects. Some examples include performing a change to write on a property node, turning off labels on the front panel, or changing the numberical representation of a terminal.
 
LabVIEW is a great tool!
 
Respectfully,
-Ron Synakowski
0 Kudos
Message 1 of 5
(2,778 Views)
I handle this with arrays of references.  When you need to perform the same action on multiple controls throughout an application you can hold an array with control references of the group you wish to change, then use an auto-indexed array with the property node(s) you want to alter, this will change all the controls in "one line of code" (LV equivalent), you can even alter the group of controls on the fly by adding or removing references in the array.  Although this does require some programming, it is relatively minimal.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 5
(2,758 Views)
I have attached a very simple example of "grouping", notice that the controls are all inherited from the control class so they can be cast to the same super class and therefore grouped in the same array.  This only works for common classes controls and graphs can not be grouped.  Sorry about the poor GUI and coding, it took me only about 3 minutes to code up (version 7.0)-
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 5
(2,749 Views)

Paul,

That is a nifty code example. I learned about the Generic Typecast. Thank you.

-Ron

0 Kudos
Message 4 of 5
(2,733 Views)
Glad it helped.  One other nice feature is that if you open a reference to your vi, then select the front panel property then select the objects[] property you will have an array of references to all the objects on a front panel, this will group all controls in a similar fashion sans the build array.  Very useful for hiding all controls or modifying properties as a group.  This is nice because if you add another control to the pannel it will already be coded for a change.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(2,714 Views)