LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change labels/text in cluster

Hi,

 

I have a rather cosmetic question about the dynamical change of labels. My programme basically uses an array of cluster, each cluster contains arrays, numbers and, currently, 32 strings to label booleans that are used to control DIO outputs. Since I want to use this programme on different computers the labels should be changed on each computer in a easy way. Hence, I need to change the text and the color of these 32 string. It is possible to do that in a very crude way by addressing all 32 strings with their individual property node.

 

Is there any better way? The pictures shows one of my attempts to solve that problem. Obviously doesn't work as the colour of the string isn't changed.

The input VI on the left outputs an array of clusters, each cluster contains a string and a colour.

 

LabelChangeTest.png

 

 

Everything would be really easy if an array of strings could store the colour of the strings.

 

Cheers,

U.

 

 

0 Kudos
Message 1 of 3
(3,892 Views)

I have no idea why you would want to do this.  On other computers? - what changes?  Do you mean that they have different DAQ configs?

 

I don't think your app would do anything since you use the same Temp String ref every time (index).  You change the string control properties but then you load the Temp String into the cluster which hasn't been changed..

 

The code makes no sense.  Post some code that you think works.

0 Kudos
Message 2 of 3
(3,871 Views)

UKrohn wrote:

Hi,

 

I have a rather cosmetic question about the dynamical change of labels. My programme basically uses an array of cluster, each cluster contains arrays, numbers and, currently, 32 strings to label booleans that are used to control DIO outputs. Since I want to use this programme on different computers the labels should be changed on each computer in a easy way. Hence, I need to change the text and the color of these 32 string. It is possible to do that in a very crude way by addressing all 32 strings with their individual property node.

 

Is there any better way? The pictures shows one of my attempts to solve that problem. Obviously doesn't work as the colour of the string isn't changed.

The input VI on the left outputs an array of clusters, each cluster contains a string and a colour.

 

LabelChangeTest.png

 

 

Everything would be really easy if an array of strings could store the colour of the strings.

 

Cheers,

U.

 

 


 

THere are a couple limitations stopping you.

 

1) "elements of an array can difer in value only."

 

2) "The attributes of array elements must all be the same".

 

3) "THe strings ofa cluster are used to allow bundling and unbundling 'by name' so can not be changed at run time." Captions can.

 

SO if you switch over to a cluster of clusters and attack the caption instead of teh label you shouldb be good to go.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(3,867 Views)