LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relative Path confusion.!

Solved!
Go to solution

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

0 Kudos
Message 1 of 5
(3,099 Views)

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

0 Kudos
Message 2 of 5
(3,084 Views)

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 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 5
(3,073 Views)
Solution
Accepted by topic author Norick_17
0 Kudos
Message 4 of 5
(3,064 Views)

Thanks for the answers!

0 Kudos
Message 5 of 5
(3,017 Views)