LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting a file to load from a directory

With the current code the file path/ directory was already present. What im trying to do is add in a drop down menu that will allow the user to select one of the multiple files saved in the same directory/ folder to be loaded. Can anyone assist?

0 Kudos
Message 1 of 8
(2,731 Views)

Im using Labview 2009

0 Kudos
Message 2 of 8
(2,727 Views)

A couple of options:

 

Option 1: Use the File Dialog under File I/O->Advanced.  It's a pretty handy Express VI.

 

Option 2: If this is meant to be a one shot UI, Right Click on the Path Constant and Change to Control.  Make sure to set the browse options to select folders.

0 Kudos
Message 3 of 8
(2,719 Views)

Thank you I will give that a try!

0 Kudos
Message 4 of 8
(2,715 Views)

If your end objective is to provide a list of files then use the List Folder function to get the list of files in a directory. You can provide a pattern to list only specific files. Then wire that list to the String[] property of the combobox that you have.

0 Kudos
Message 5 of 8
(2,693 Views)

Thank you for your reply. What im trying to do is while the program/ subvi is runing the user will select a file from the combo box/ drop down menu and hit load. This will select one of the multiple files in the directory and load it  into the rest of the program. This section of the code is to load the hardware device with list of numbers from the file that is selected. I only have 3 but it can be up to 200 files.

0 Kudos
Message 6 of 8
(2,684 Views)

OK, so then you can do what I just said.

0 Kudos
Message 7 of 8
(2,676 Views)

Thank you!

0 Kudos
Message 8 of 8
(2,671 Views)