11-05-2021 08:45 AM
I would like to know the directory that a vi is in, and I want the same behavior when I build an application. So, I made the test code using the Application Directory node. Here it sounds like the Application Directory should be the directory that my vi is saved in. But when I run it, it gives me just the LabVIEW directory, C:\Program Files (x86)\National Instruments\LabVIEW 2017.
What am I doing wrong?
Solved! Go to Solution.
11-05-2021 09:09 AM - edited 11-05-2021 09:12 AM
This is an OpenG function. Use the standard Application Directory from the File Constants palette instead.
Actually, the standard Application Directory returns the directory where the application project is located (or the executable directory in a built application).
11-05-2021 11:20 AM
11-05-2021 01:53 PM - edited 11-05-2021 02:01 PM
In case another beginner can't find this function, don't search for "Application Directory". That will only return the undesirable OpenG version. Instead search for "File Constants" and you will see it on that palette.
But, I am sure to forget which palette it's on next time, and the chance finding it manually is low, since I'd have to navigate down two levels. Am I using the search function incorrectly?