LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a function that gives my current path?

I want to create an exe Labview file for someone else to use it, and I want the program to know in which folder he put it. Is there a way to know that?
0 Kudos
Message 1 of 3
(3,062 Views)

Yould use Current vi's path (file I/O >> Fiel constants palette) and pass the output to StripPath.vi: the output from this is the path to the directory the VI is in. This works both when running as a VI inside LV and when compiled in an executable.

An alternative solution can be to use an application property node (Application control palette) selecting Application as a class and Application:Directory path as the property: this solution returns the path to LabVIEW.exe when running inside LV environment and path of youe EXE when the application is compiled.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,060 Views)
Thanks Roberto, this is exactly what I needed.
0 Kudos
Message 3 of 3
(3,009 Views)