LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to capture files in a directory

You won't be able to change the selection mode from scalar to array during run-time using this property node. The reason is that the code is already compiled, and changing the selection mode would change the data type of the wire output from the listbox. You can't change this data type during run-time.

Instead, do as Dennis suggested and use the right click menu for the listbox control on the front panel to change the selection mode accordingly in edit mode.
Jarrod S.
National Instruments
0 Kudos
Message 11 of 13
(490 Views)

My apologies on the previous code snippet.   I wired a 38 to the Selected Mode property instead of the ItemSymbol property.

Now the *.vi files for the selected folder end up in the listbox.  However, only the first file has the ItemSymbol beside it.  What I really want is to have the item symbol appear when the user selects the file.  Also, I display my feable attempt at displaying (in an array indicator) the files selected by the user, and displaying how many files were selected.  This, as you can imagine, did not work.  I couldn't find any properties that gave me such information.

0 Kudos
Message 12 of 13
(481 Views)
Did you actually look at the code snippet I posted? The listbox itself returns an array. This array is the elements that have been selected. If you select items 1 and 4 in the list, you have an array with 1 being the value of the first element and 4 being the value of the second element. The number of items selected is the array size of the listbox control. Your code snippet is just returning the information you just wrote.
0 Kudos
Message 13 of 13
(464 Views)