04-28-2014 07:20 AM
Hello Every one
I am trying to programatically update my combobox using string[ ]. It should be updated with .csv files saved in a particular forder but it is updating with all the forder names on my desktop. I am unable to select the pirticular folder which i want to update in my combox....... I dont know whats the mistake i am doing......coud someone help me please. Thankyou in advance
Regards
Pratheek
Solved! Go to Solution.
04-28-2014 07:32 AM
A few things.
You're using the System Path function for your directory. It sounds like you want to use a file dialog.
You probably want to update the ComboBox in a different event than on a value change. Otherwise you're always going to get prompted for the selection directory.
Also, you don't need the reference control. You could just link the property node implicitly for updating the strings.
04-28-2014 07:45 AM
hi Taki1999
Thanks for the immediate reply......I am sorry I didn't get ur point....i am fairly new to labview. Could you please explain it more clearly. I tried it with the recursive file block.......but even then i have the same problem....
04-28-2014 07:56 AM - edited 04-28-2014 07:56 AM
You could just use a path control on the front panel. Then you just type in the path your want or use the browse option. Then use the Recursive File List function to limit the returned files to *.csv.
04-28-2014 07:56 AM - edited 04-28-2014 07:58 AM
OK.
First thing: Which directory do you want to scan for files? Do you want it to be user selectable?
If you want it to be user selectable, use the File Dialog under File I/O->Advanced instead of the Get System Directory.
What sort of problems are you running into with the List Folder function? Are you getting too many files? Wrong files? Are you sure your wire is connected to the filenames output instead of the foldernames output?
EDIT: Crossrulz solution is probably closer to what you want.
04-28-2014 08:14 AM
04-28-2014 08:18 AM
One more small doubt.......it is displaying the whole file path in the combobox.....is it possible to disply only the file name in the combobox with out any extensions ?
regards
Pratheek
04-28-2014 08:23 AM
FOR loop with a Strip Path inside.
04-28-2014 08:27 AM
thanks alot....