LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating combobox

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(2,799 Views)

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.

0 Kudos
Message 2 of 9
(2,792 Views)

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....

0 Kudos
Message 3 of 9
(2,786 Views)
Solution
Accepted by topic author pratheek

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 9
(2,774 Views)

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.

Message 5 of 9
(2,773 Views)

got it......Thanks alot Taki1999 and 

0 Kudos
Message 6 of 9
(2,756 Views)

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

0 Kudos
Message 7 of 9
(2,750 Views)

FOR loop with a Strip Path inside.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 9
(2,745 Views)

thanks alot....

0 Kudos
Message 9 of 9
(2,739 Views)