06-18-2012 03:34 AM
Hello
I do have following situation:
Development Env.:
c:\x\y\temp.vi <---- My Top VI
c:\x\y\ini\conf.ini <---- Config File
Run Time PC:
c:\program files\test\temp.exe
How do I set a relative path now to my conf.ini File? With the strip function (twice) it does not work and and conf.ini File is not found on my run time PC. On the Dev. Env. there is no problem to find the conf.ini File.
Thanks in advance
Solved! Go to Solution.
06-18-2012 05:09 AM - edited 06-18-2012 05:09 AM
Hey Norick,
In the runtime mode what is the absolute file-path of your .ini file? I'm assuming you are using the current vi path? Stripping this path twice should give you c:\program files\test\. Is this where the .ini file is? If so it in my experience it should work so something more complicated must be happening;-)
If its in a 'c:\program files\test\ini\' folder you have to build up your file path after you do the filepath stripping!
I find if its a small executable its worth re-building with an idicator on the front-panel which shows exactly what file you are trying to load - this can help rule out the filepath as the cause - as I said there could be something more complicated happening! A popup showing the file-path is the file is not found can also be a good (temporary) debugging option - particulalry if you can use the dialog to browse to the filepath you want to use.
Sorry I couldn't offer more help,
Regards,
Dave
06-18-2012 06:19 AM
The .exe is considered a folder for the path, thus you need to use an extra Strip path in the executable compared to the .vi.
Show the built path and you'll see. 🙂
/Y
06-18-2012 07:33 AM
07-20-2012 09:40 AM
Thanks for the answers!