LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Directory node not working as expected

Solved!
Go to solution

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? 

0 Kudos
Message 1 of 4
(2,717 Views)
Solution
Accepted by topic author colorimeter

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).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 4
(2,710 Views)

Your link talks about this function, so use that. 😄

 

Message 3 of 4
(2,674 Views)

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?

colorimeter_0-1636138830915.png

 

0 Kudos
Message 4 of 4
(2,662 Views)