LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D Array (Double) into a Drop Down

Solved!
Go to solution

Hello together,

I would like a 1D Array transfer to a Drop Down.  It is possible?

 

Greetings

Peter

 

LV2011

0 Kudos
Message 1 of 5
(2,635 Views)

1D array in a drop down means the elements of the array has to be the elements of the drop down control or each element of the drop down should hold an array. The second one is not possible (As far I know) 1st one you can do.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 5
(2,629 Views)

I have no idea, how can I made the VI.

Do you have a example program?

Thanks Peter

0 Kudos
Message 3 of 5
(2,620 Views)
Solution
Accepted by topic author zäpfle

You have to use the Strings[] or the Strings and Values[] property of the dropdown, depending on what you want the value of the dropdown to return. The Strings[] portion refers to the text you see when you click on the control and display the dropdown list. The Values[] property refers to the value that is returned when a selection is made. Normally, this is an integer value that refers to the index. You can make it return a different value if you wish, but you need to explicitly set that.

 

The Strings[] propery is just a 1D array of string. Thus, you can simply use the string functions to convert your array to an array of strings and then wire that to the Strings[] property.

 

The Strings[] and Values[] property is an array of clusters. You'd have to bundle a string (the displayed text) and the value into a cluster, and then build up an array. An auto-indexed for-loop is the most straightforward way of doing this.

 

 

If you do not undestand what an autoindexed for-loop is, or what bundling is, then you need to spend some time in the LabVIEW tutorials. To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.

0 Kudos
Message 4 of 5
(2,615 Views)

Thank you

Peter

0 Kudos
Message 5 of 5
(2,607 Views)