LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i get LabView to use a relative path?

i.e. the directory the program is executing without explicitly specifying it prior to compiling?
So that i can read in a settings file which the user can alter?
0 Kudos
Message 1 of 3
(4,693 Views)
Under file I/O>>File constants there's a constant for current vi's path, you can strip the path to get the directory, but be sure to do it twice if you build an executable, to quit the executable name too.
Hope this helps
0 Kudos
Message 2 of 3
(4,693 Views)
To get the path that your program is running from use the "Current VI's Path" constant in theFile I/O>>File Constants palette. Then use "Strip Path" in the File I/O palette. If the vi has been made into an executable then the name of the exe will be at the end of the path. Just do check for .exe at the end, if there is then do another strip path.

See attached.

Brian
Message 3 of 3
(4,693 Views)