LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialising combobox within an array cluster

Solved!
Go to solution

Hello,

 

So I have created an array of clusters.

within the cluster are 2 comboboxes which I would like to initialise with a string array I have generated from 'plot_IO'. However I have no clue how proceed further to do that.

 

Would anybody be able to advise on how it, if it is at all possible.

 

Thanks. 

 

string array to combox.png

0 Kudos
Message 1 of 6
(3,521 Views)

Hi sherzaad,

 

use the reference of the array to get a reference to its cluster element. Use that cluster reference to get the reference of the cluster elements. Search the combobox references among them and set their properties…

Or right-click the combobox on the FP and create a reference or property node.

 

(Keep in mind: in an array all elements share the same properties!)

Best regards,
GerdW


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

Thank you GerdW for your reply.

 

sorry but still a newbie here... and still lost... Would you be able to elaborate more  - maybe with an example Smiley Wink - how to make use of these reference (are referring to creating a reference variable?)

 

I want all the array elements to be initialised with the same values so your solution should work for me (once I understand it! Smiley Happy)

 

 

0 Kudos
Message 3 of 6
(3,491 Views)
Solution
Accepted by topic author sherzaad

Find the control within the array on the front panel.  Right-click the border of the combo box and select "Create ► Property Node ► Strings []".

 

Drop that on your block diagram somewhere.  Right-click it and select "Change to Write".  Then wire in an array of your strings for the drop-down.Set combo box strings.png

0 Kudos
Message 4 of 6
(3,485 Views)

If you attach your VI, then we can make a few (small) modifications to it and re-post it to show you how to do this.  Please help us by attaching your code, saving us a lot of steps (and ensuring that we can use the appropriate version of LabVIEW that you need).

 

Bob Schor

0 Kudos
Message 5 of 6
(3,481 Views)

Worked brilliantly. Thanks and Kudos! Smiley Happy

0 Kudos
Message 6 of 6
(3,465 Views)