LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster member names for use with "get control value" or "set control value"

Is it possible to directly access individual elements of a front panel control cluster using the "get control value" or "set control value" methods?
If so what name should I wire to the "control name" input?
 
For example, if I have a cluster labeled AAA and it contains a numeric labeled BBB and a string called CCC and if I want to access the string directly with the aforementioned methods, what do I use for the control name?
 
I've tried "AAA.CCC" based on what shows up in an event structure tied to a data change event of CCC but that does not work.
 
Or is this a matter of not being able to get to the parts of the cluster, just the whole thing?
0 Kudos
Message 1 of 5
(3,170 Views)
I'm pretty sure you can't do that, because if you look at what you get when you use Get All Control Values, you will see you get only top level controls. A solution would be to use Get Control Value, unbundle the cluster and bundle with the new value.

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(3,161 Views)
I'm pretty sure you can't do that, because if you look at what you get when you use Get All Control Values, you will see you get only top level controls. A solution would be to use Get Control Value, unbundle the cluster and bundle with the new value.

___________________
Try to take over the world!
0 Kudos
Message 3 of 5
(3,161 Views)
I'm pretty sure you can't do that, because if you look at what you get when you use Get All Control Values, you will see you get only top level controls. A solution would be to use Get Control Value, unbundle the cluster and bundle with the new value. It

___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(3,160 Views)

hi there,

you can open a reference to the vi and get the "Front panel" object. this object has a property "controls[]" which gives you a list of references to all controls of the vi. then you have to get the corrcect reference, cast it to "cluster", call the "controls[]" property of that cluster reference and select the correct reference of the control in the cluster....

this will work, but you should do this only once in your code and store the reference of the control in a FGV. be sure to close all references in the controls[] lists, even those not needed, otherwise memory leaks may occur. you can search the correct reference in the lists by its label, otherwise you'll get confused when you change the order of the controls on the Front panel or inside the cluster.

best regards

chris

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 5
(3,160 Views)