LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How save text file using relative project path

Hi there,

 

I am trying to create an application which uses my project's relative folder path in order to save an text file into the same folder (so that I do not have to rewrite the build path when I run my application on another computer, for instance). I've made some research, but I could not find anything that would solve this issue.

 

How should I do this properly?

0 Kudos
Message 1 of 6
(4,049 Views)

See "file constants" palette.
There are you can find "current vi path" and "application directory" constants.

0 Kudos
Message 2 of 6
(4,045 Views)

Okay, but what should I use in order to specify the name of my text file?

0 Kudos
Message 3 of 6
(4,040 Views)

Call your text file whatever you are planning on calling it!

0 Kudos
Message 4 of 6
(4,029 Views)

fn.png

Message 5 of 6
(4,025 Views)

@Artem.SPb wrote:

There are you can find "current vi path" and "application directory" constants.


Just to be completely clear here, since we are talking about files outside of an executable, you want to use Application Directory.  Current VI Path is useful for making dynamic calls to VIs within an executable.

 

Now for the actual problem at hand, just use Application Directory and a Build Path.  The "name or relative path" input of the Build Path should be pretty self-explanatory.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(4,022 Views)