LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

path file control indicating the installation file directory

Hello,

I'm making a package on labview 6.1.
Once this package is installed on a pc the software will use some txt files.
On my code I specified the directory of these txt file but if the user want to change the install directory given by default, the txt file will be no more accessible.
Is there a possibilty to put a control in the labview code that allow to take the real install directory of the exe and then indicate the name of the txt file.

Thanks for your help

Regards

Popo
0 Kudos
Message 1 of 4
(3,312 Views)
use the function
current vi path from the FIleI/O pallete-----File constants

get the main vi's path ( (using this function), and then set all other file paths relative to the main vi's path.

use function build path
0 Kudos
Message 2 of 4
(3,304 Views)


Dr. Imad a écrit:
use the function
current vi path from the FIleI/O pallete-----File constants

get the main vi's path ( (using this function), and then set all other file paths relative to the main vi's path.

use function build path





Many thanks

Popo
0 Kudos
Message 3 of 4
(3,299 Views)
Dr. Imad, et al.,

I just wanted to expand on your post to clarify the intermediate steps that must be taken for this to work correctly.

The output from the "Current VI's Path" vi needs to be wired to a "Strip Path" vi to remove the current vi's name from the path.  The "stripped path" terminal is then wired to the "base path" terminal of a "Build Path" vi.

Thank you for the great information; it helped me over a hurdle I had been struggling with.

DaBayer
0 Kudos
Message 4 of 4
(3,219 Views)