From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I'd like to add a log.txt file into my LabView projects which eventually get built up into a LabView application (.EXE). I then use that built application to distribute to multiple computers on our manufacturing floor. Currently when I build my application I have to hard code the path where I want the file which changes for every computer I put it on.
I'd like the log.txt file to always be created in the folder of my .EXE that I put on the computer. That way I always no where it is and I don't get a path error when this built up .EXE changes computers. How would I go about creating a relative path in my vi that gets built into the .EXE?
Look in the File Constants >> File I/O palette. There is a function called Get System Directory. You can choose from many different paths that are based on the OS.
There are primitives in there that will return things like the Application Directory.
I'd like the log.txt file to always be created in the folder of my .EXE that I put on the computer. That way I always no where it is and I don't get a path error when this built up .EXE changes computers. How would I go about creating a relative path in my vi that gets built into the .EXE?
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