LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

current VI's path

If I use the "current VI's path constant" I get different outputs when I
use it under LabVIEW-developmant-envoirement and in an application. Both
times I'd like to get the path of the VI respectively of the EXE. But
the "current VI's path constant" returns path\*.vi under the
LabVIEW-developmant-envoirement and path\*.exe\*.vi in the application,
so that I have to interpret different.

Anyboby knows how to get the same path in both cases?

Niko
0 Kudos
Message 1 of 5
(5,725 Views)
Try with this VI
Roberto

"Nikolai Maris" ha scritto nel messaggio
news:3A951672.AFE51647@t-online.de...
> If I use the "current VI's path constant" I get different outputs when I
> use it under LabVIEW-developmant-envoirement and in an application. Both
> times I'd like to get the path of the VI respectively of the EXE. But
> the "current VI's path constant" returns path\*.vi under the
> LabVIEW-developmant-envoirement and path\*.exe\*.vi in the application,
> so that I have to interpret different.
>
> Anyboby knows how to get the same path in both cases?
>
> Niko
>
>



[Attachment VIPurePath.vi, see below]
Message 2 of 5
(5,726 Views)
Hi,

guessing that you like to determine the path above *.exe or *.vi, you
simply can write a VI, which cuts off the *.exe/*.vi from the full path.
What you get is something like a systems path for all your VIs. In order
to cut *.exe take a "match pattern.vi" and wire the regular expression
"\.[Ee][Xx][Ee]" to it. If pattern will be found strip a directory level
if not, you have to do nothing. If you like the stripped path without
*.exe and *.vi simply strip another directory level from path and your
done! Save your "system path" in a global variable.

Hope that helps
chris

Nikolai Maris wrote:
>
> If I use the "current VI's path constant" I get different outputs when I
> use it under LabVIEW-developmant-envoirement and in an application. Both
> times I'd like to get the pa
th of the VI respectively of the EXE. But
> the "current VI's path constant" returns path\*.vi under the
> LabVIEW-developmant-envoirement and path\*.exe\*.vi in the application,
> so that I have to interpret different.
>
> Anyboby knows how to get the same path in both cases?
>
> Niko
0 Kudos
Message 3 of 5
(5,725 Views)
Hello Nikolai,

I have experienced a lot of exactly same problems
as you meet now and looked up all references, went
on many trials as possible using another components
in diagrams. Then, I reached to the conlusion "maybe
there is no way".
But a way using programming skills is possible
as that

first convert the path to character lines,
secondly, transverse all character lines above
third search in the transversed character lines
from an initial character and split them with
the first "\"(on Unix or Linux "/"?) and take
the latter character lines out of two split lines,
and at last transverse the taken out lines above.

Excuse me for a moment.
My supposing might be always too realistic and
sometimes a little boother(-;).

Tom

Nikolai Maris wrote:

> If I use the "curr
ent VI's path constant" I get different outputs when I
> use it under LabVIEW-developmant-envoirement and in an application. Both
> times I'd like to get the path of the VI respectively of the EXE. But
> the "current VI's path constant" returns path\*.vi under the
> LabVIEW-developmant-envoirement and path\*.exe\*.vi in the application,
> so that I have to interpret different.
>
> Anyboby knows how to get the same path in both cases?
>
> Niko
0 Kudos
Message 4 of 5
(5,725 Views)
You can download a 'current path' tool (path.llb) from the NI Develper Zone

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&CC067452BF0B4146
8625683A000C071B&cat=F9D3C0CF2C3AD8B2862567E0007A7A6B


Robert



"Nikolai Maris" schrieb im Newsbeitrag
news:3A951672.AFE51647@t-online.de...
> If I use the "current VI's path constant" I get different outputs when I
> use it under LabVIEW-developmant-envoirement and in an application. Both
> times I'd like to get the path of the VI respectively of the EXE. But
> the "current VI's path constant" returns path\*.vi under the
> LabVIEW-developmant-envoirement and path\*.exe\*.vi in the application,
> so that I have to interpret different.
>
> Anyboby knows how to get the same p
ath in both cases?
>
> Niko
>
>
>
Message 5 of 5
(5,725 Views)