LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

listboxes as file explorer

Hi,
 
I found the listboxes as file explorer example in LabView and it is perfect for my project.
However the only issue I have is that it only goes up to the root directory.  There is no way of changing directories (i.e. A drive, F drive etc.).
I was wandering if anybody has a clue to help me change these directories dynamically.
I would appreciate all your help.
0 Kudos
Message 1 of 10
(5,087 Views)

It seems it only needs a few minor tweaks to do what you want. 😄

See attached modified version (LabVIEW 7.1).

(Overall, I have the feeling that this code could be made significantly more efficient using an event structure)

Message Edited by altenbach on 11-19-2005 12:32 PM

Message 2 of 10
(5,080 Views)

Thank you so much for your response.

This will help me a lot.  I do agree that using event structure would be a lot easier; however I am still learning LabView.

Thanks again.

0 Kudos
Message 3 of 10
(5,065 Views)
Here is a quick draft  using an event structure to get you started. I only implemented the basic core functionality for simplicity. Modify as needed. It still needs a few tweaks here and there. 😉
 
Notice that I got rid of the "UP" button and added a ".." entry on top of the list that allows you to go to the parent folder. Seems cleaner. 😉

Message Edited by altenbach on 11-20-2005 09:15 AM

Message 4 of 10
(5,065 Views)

Hi,

Thanks again.

I do have a couple of questions.

1. I don't see the "..."

2. The default directory icon in the Block diagram points to the c drive.  Is there a way that it can point to my computer to display all drives at the beginning of the program.

Thanks

0 Kudos
Message 5 of 10
(5,056 Views)

Well, you need to run it!

The ".." only shows up if there is actually a parent folder. It does not show on the root of the tree where there is nowhere to go. 😉

To start at "My computer", initialize the path shift register with an empty path constant, see attached.

Message Edited by altenbach on 11-20-2005 09:49 AM

Message 6 of 10
(5,058 Views)
Thanks again,
 
I need your opinion.  I am using the listbox file explorer example to display the contents of my computer (i.e. files and directories)
However I am using a second listbox file explorer to view the contents of an instruments harddrive.  However  the instrument does not act like a computer at all.
The only way to view the contents is to used System Exec.vi (i.e. ftp) or use a command from the program manual that displays files and directories in one string. However the command does not display the files in the subdirectory.  So my decision is to use System Exec.vi to view the contents of the instrument.  However again when I enter the command "dir" it only displays the main directory.  What do you think?  Basically my program will function like a ftp program that transfers files between computer and instrument.
Your opinion is greatly appreciated.
 
Thanks.
0 Kudos
Message 7 of 10
(5,042 Views)
Is is possible to have 2 event structures in 1 loop?
0 Kudos
Message 8 of 10
(5,024 Views)


@PReitano wrote:
Is is possible to have 2 event structures in 1 loop?


No, that's not a good idea in general. You should be able to get away with a single event structure. Simply add more event cases.
0 Kudos
Message 9 of 10
(5,015 Views)
Thanks.

I was wondering if you can help me with some parsing code.
I have enclosed a similar listbox for file explorer, however this time it is for my instrument.
I am trying to make it similar to the one you created yesterday with computer system.

0 Kudos
Message 10 of 10
(4,979 Views)