LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drop-down boxes in LabVIEW

I'd like to offer my end user a drop-down box from which he can choose one of ten model numbers. I want to read those model numbers in from a text file (ten lines, each with one model number). Then I want to display the user's choice on the front panel, as well as using it to open up another text file whose name is the same as that model number (plus the requisite .txt extension). Thank you very much!
0 Kudos
Message 1 of 4
(2,819 Views)
Here's a bare bone LV6.1 way of doing it.

Model is the vi, the names are in Names.txt

Obviously you'll have to add some parts to it (directory info, file type to open, yadda yadda), but this should get you on your way.

Cheers,
~J5


2006 Ultimate LabVIEW G-eek.

Download All
0 Kudos
Message 2 of 4
(2,818 Views)
J5, I gotta thank you for your help... and ask for a bit more. I'm new to LabVIEW, so I'm having a bit of trouble mentally walking through the routine. Would you mind to help me out with some additional comments? Thanks so much,
-Dan
0 Kudos
Message 3 of 4
(2,818 Views)
Basically, this loads an ASCII text file of 10 lines in length. It searchs for the first end of line character, a carriage returen (/r) and loads that line into a listbox. This line is then removed, and the next line is searched for. The process is repeated 10 times for a full 10 model list. The listbox is reset to and waits for a value other than to be made by the user. The chosen value is displayed and other stuff can then be done (like load a file). Add'l comments are in the updated block diagram.


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 4 of 4
(2,818 Views)