‎12-18-2014 02:44 AM
hi
I have over 40 indicators (temperatures) and I would like to change their labels programmatically. In Visual Basic it was possible to do an array of controls or indicators.. how can I do that in Labview ?
thanks
Solved! Go to Solution.
‎12-18-2014 02:52 AM - edited ‎12-18-2014 02:57 AM
You can do that when the VI is in edit mode but not at run time. Instead you can use the caption and change it programatically.
Edit: Sorry you cannot access the label of an individual element of an array. Here is a little bit information about the array elements properties
‎12-18-2014 03:08 AM
‎12-18-2014 03:12 AM
hi
sorry, I didn't get it...
Can I make, say 40 thermometer indicators, in an array and address their properties by index in a For loop ?
(also, I need to put them on two different panels... )
thanks for any help
n
‎12-18-2014 05:38 AM
Hi nitad,
40 indicators in an array share the same properties, so you can't put your thermometers in an array.
But you can get the reference to each thermometer indicator and put those references in an array. Then use a FOR loop on those references!
‎12-18-2014 10:17 AM
If you need each indicator within the array to have a different label, what you can do is create a cluster that contains a string indicator and your thermometer indicator. By customizing the string (flat classic string, transparent background and border) and arranging things within the cluster and customizing its appearance, you can make it look like your string is a label to the thermometer.
Now when you iterate through the array of clusters, you can write the name to the string and the value to the thermometer.