LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

make start path in browser options default

Hi,

I have vi with file path control, there i select any directory. I want that after i select directory, it will be start path of file browser, that if i run vi in next time, browser will start from this directory.

All thanks,

Nadav Chernin
0 Kudos
Message 1 of 5
(2,858 Views)
Attached is a file that should do what you are looking for. The first time you run it it will probibly default to the desktop. Navigate to a sub directory and select a file. The next time you run the vi, it should default to the subdirectory the file you selected the first time was in.

Mike...

By the way, if you select a shortcut file, the default directory will be the location of the shortcut target--not the location of the shortcut.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,858 Views)
Thanks, Mike.
Unfortunally, your vi make this all time i work in LabVIEW. But if i quit from LV and enter again, vi run from old directory.
Any ideas how do i this?
0 Kudos
Message 3 of 5
(2,858 Views)
Ok, if you want the default to be saved between restarts, you need to save the default path somewhere, and LabVIEW's *.ini file is a good place for stuff like this. Use the configuration file vis to read the default path the first time the browser executes (the path in the shift register will be an empty path) and write the path back to the configuration file if the user changes it.

Things get a little more complex if you are going to be distributing your code as a standalone executable, because then you have to keep track of which *ini file to use: LabVIEW's or the standalone application's.

I'l put something together and post it tomorrow...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 5
(2,858 Views)
Here's the updated code I promised...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,858 Views)