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.
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.
03-12-2014 06:33 PM
Hello
I am new to Labview OOP coding.
I am trying to hide/unhide a control within a cluster. I realize the controls are available as a 1D array of reference. And I am able to specify an element of the array of references to hide or unhide the specific element. How can I accomplish this (hide/unhide) without knowing or caring about the order of the element in the cluster ? Thanks
03-12-2014 06:52 PM - edited 03-12-2014 07:16 PM
You could iterate through the array of references looking at properties of the reference such as label name and stop when you find the reference whose name matches the control you want.
Beyond that, the order of the controls within the array of references should be the same as the order of the controls within the cluster when you use the Reorder Controls within Cluster... menu choice.
03-12-2014 07:19 PM
If you want a reference to a specific cluster element, simplify go to the front panel, right-click the desired element inside the cluster, and select "create reference".
(Sorry, posting by phone. Cannot look at your VI)
03-12-2014 08:37 PM
Hi, krishk24,
I usually right click the control in the cluster to create the property node and choose the visible property.
But I'm not sure it is a good way to apply to all situations.
03-12-2014 08:59 PM - edited 03-12-2014 08:59 PM
Yes, after looking at the code, it seems creating a direct reference is easiest. (You would need to create a reference as I suggested earlier if you change the visiility e.g. from within a subVI).