From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-15-2016 03:08 PM
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?
05-16-2016 05:32 AM
Hello,
Looks like GetProjectDir is what you are looking for. The documentatin link also explains how you can use this function.
Constantin
05-16-2016 09:33 AM
Be careful if your app will be in a "Program Files" directory on the target machine, which is different from debugging in the IDE. Your app may not be allowed to write to that folder, although Windows may silently redirect the write to another folder. More info on that here
Since you asked how to do it "properly" you should consider getting the "AppData" folder and writing your files into your own folder there. My questions on doing that properky that were answered in this thread.
Good luck!