LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Change Combo Box List

Hello,
 
I searched heavily on these forums and found answers that were close, but I cannot quite figure out the following:
 
I have a large number of individual RF assemblies, most having the same test requirements.  My plan is to create a combo box (or similiar) from which the assembly number can be selected.  This box will then provide a numeric value to a case structure, which will then provide the need test parameters and what not.
 
I know the combo box list can be populated with a property node and the property node fed by an array.  It is my hope to be able to put this info in a spreadsheet file that can be updated as necessary and then imported into the VI at run time.  Therein lies my problem.
 
Using the strings and value[ ] property, I can make the combo box work correctly, but I cannot figure out how to import the spreadsheet into the proper format to feed the property node.  I've tried various spreadsheet import schemes offered on these forums, but none quite hit it.  I've tried to figure it out on my own, but I'm just spinning my wheels.
 
Any help would be appreciated.
 
Thanks.
0 Kudos
Message 1 of 5
(2,897 Views)

Hello,

I've attached a VI that I think will help you.  I actually used the Index & Bundle Cluster Array function, which I don't think I've ever used before.  🙂  Anyway, this function gets the two arrays of strings from my tab-delimited text file and manipulates them into an array of clusters containing two strings each, which is the data type required by the StringsAndValues[] property of the Combo Box:

I hope this gets you started in the right direction.  Good luck!

-D

Message Edited by Darren on 03-17-200602:18 PM

Download All
0 Kudos
Message 2 of 5
(2,889 Views)

Here is a vi that is the basis of something similar which I use in a test program. Each test parameter file is saved into a directory with a name corresponding to the model of the device to be tested. The user will select the test based on what he/she is currently working on. The parameters are loaded into the program using the configuration file vi's. This is only a partial code snippet. It may or may not be what you are trying to do.

 

 

0 Kudos
Message 3 of 5
(2,879 Views)

Hey, thanks a lot.  These solutions look good; can't wait to try them out.

Thanks again

0 Kudos
Message 4 of 5
(2,873 Views)
Both of these approaches work well.  In fact, combining them works even better!  Thanks.
0 Kudos
Message 5 of 5
(2,844 Views)