LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic description of several controls in a cluster

Hi
I have a cluster with 50 controls and I want to set the decription of these controls dynamically.
I know that it is possible to do this with "property nodes" -> "description".
BUT isn't there another, more elegant way? Like changing the cluster to an array and then...?

Thanks for your help

Yves
0 Kudos
Message 1 of 5
(2,817 Views)

In an array all elements have the same properties, they all must be of the same type and you can't change the actual cluster control into an array, only the cluster data.

Those are three reasons you can't change to an array. If you want an array of references to all the controls in the cluster, you can use the cluster's Controls[] property which returns an array of references sorted by the cluster order. You can identify specific controls by their labels, but note that this will break if you change the controls labels later without updating your case structure. Another option is to create a reference for each control and go over them in a loop.


___________________
Try to take over the world!
Message 2 of 5
(2,814 Views)
Thank aou for your help.
I won't change the control labels (The labels have a text part and a number from 0 to 50). So the hint with the references is ok for me. But I don't really get it done.
Do you have any example?

Yves
0 Kudos
Message 3 of 5
(2,809 Views)
Hi Yves,

tst meant something like this:

(I took an error cluster for simplicity.)

Message Edited by GerdW on 04-30-2007 11:33 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,808 Views)

To further simplify the example posted by Gerd (since you need 50 cases and not just 2), you can wire the string into the case selector. Consider right clicking the case structure and making it case insensitive.

My personal preference would be using an explicit reference for each control instead of relying on their labels, but with 50 controls, that would make your diagram messy and using the labels is legitimate as long as you make sure not to change them.


___________________
Try to take over the world!
Message 5 of 5
(2,798 Views)