LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

path stand alone

Hi,
I created a installation for my stand alone app. I´m worried about the paths of the files I' ll write with it at the new PC installation. Thinking about it I tried to "know" what the path of the vi or app running to save the files at the same directory. I used the "Current Vi's path" and tried to concatenate with the name of my file but it didn't work. Please see the attached vi. If anyone could help me I'd thank. I'm accepting sugestions too.
Thanks,
Celia
 
0 Kudos
Message 1 of 8
(3,095 Views)

Hi Altenbach,

I´ve already seen the link you send me. Have you seen my vi in attchment? I couldn't concatenate the path with the "Concatenate String" yet. It don´t work. Try it and tell me.

Thanks,

Celia 

0 Kudos
Message 3 of 8
(3,087 Views)

If your VI is at c:abc\myvi.vi, then that's what the current path returns. You are trying to create a file c:abc\myvi.vidata.txt, probably not a good choice!

NEVER use path-to-string or string-to-path unless you are dealing with an OS specific function. To manipulate paths, you should use exclusively strip path and build path functions. In this case, you would strip once when in the development environment and twice when in an executable. There is an openG function that automatically does it or you can write your own.



Message Edited by altenbach on 12-04-2007 09:30 AM
0 Kudos
Message 4 of 8
(3,083 Views)

Hi Altenbach,

Thank you for your attention. I tried your suggestion but the result was the same, it didn't concatanated the name of my file data.txt, that is: My directory is c:\1747 and I want c:\1747\data.txt to use in file path terminal of the New File, but the result in appended path terminal of the Build Path is only c:\1747\

Thanks,

Celia 

0 Kudos
Message 5 of 8
(3,071 Views)

Most likely, your indicator is not wide enough! 🙂

A path indicator will wrap to a new line at path delimiter boundaries. Just resize your indicator to see it all.

 

 



Message Edited by altenbach on 12-04-2007 11:24 AM
0 Kudos
Message 6 of 8
(3,057 Views)
Could this possibly be an issue with "current vi's path" changing when deployed as an exe? 

E.g. in development current vi's path = c:\path\my.vi but as a deployed exe = c:\path\myapp.exe\my.vi

To get the right home dir your must use two calls to "strip path"
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 7 of 8
(3,041 Views)

Good morning Altenbach, .

You're right. Thank you very much.

Celia

0 Kudos
Message 8 of 8
(3,025 Views)