LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a user selectable file list that auto-updates from a specific folder?

I need a way to display all available files in a folder such that a user can select one and use it to continue the program. I've tried the combo box, but I've found no way to add filenames to the list (in string form), without manually editing the combo box. I've tried creating a local variable and passing strings to it, but it only shows up in the display of the box, and doesn't update the list. I would like the program to update the list automatically. I figure that I can just use the "list folder.vi" in the File I/O block diagram tools to get the list, but don't know how to relay that list to the user, so they can select one file from it. Has anyone ever done something like this?
0 Kudos
Message 1 of 3
(2,849 Views)
Hello,

the combo-box has a property called "Strings[]", which is an array of strings. The output of the "list folder.vi" is an arrya of string that can be wired to the property node.

You just have to poll the folder with the
"list folder.vi"  function to update the combo-box, don't forget to remember manually added items if necessary.

Kind regards,

André
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 3
(2,837 Views)
Thanks Andre, that works great! I must admit, I'm not so good with nodes, and haven't taken any labview classes. Sometimes I feel like I'm re-inventing the wheel 🙂
0 Kudos
Message 3 of 3
(2,829 Views)