LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of strings + array of numbers ?= cluster of numbers with names

Solved!
Go to solution

I have an array of strings.  They need to be cluster element labels.

I have another array of numbers.  They need to be the values of the cluster elements.

 

How do I make this happen?  I don't know any way to write a string variable value to the name of a cluster element.

 

Updating with things I find as I keep looking:

0 Kudos
Message 1 of 3
(3,308 Views)
Solution
Accepted by topic author EngrStudent

The main question here is why you need such feature? Do you want to change the labels of the cluster elements during runtime, or during edit time? Maybe a table control would serve you better?

 

Anyway, here is a method to do what you want, however keep in mind that using property nodes can have an impact on applicaton performance. Another thing is that, label text property is not writable during runtime, but you can show the caption instead of the label, and you can rewrite captions during runtime:

 

cliaztsr_props.png

Message 2 of 3
(3,290 Views)

Hi student,

 

this sounds like key-value-pairs!

In LabVIEW you can easily create them using Variant attributes

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(3,269 Views)