LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Path in Built App

Hi, new to labview and this is a first for me. My problem: main vi with its subs working fine on my PC, but as soon as I built an app (even on my own PC) it does not work 100%. What's not working? There are two places in the program where I enter the vi's path. I hardwire it. Now I'm positive this is the problem - have tested it out by making all directories etc of app the same and then all is going. Please take a look at the two screenshots attached - this is where I use path names. One is for a call-by-reference sub vi and the other for a help file. What do I need to do to ensure that the app knows where to get the help folder and the sub vi? I want to include the help folder (containing the created help file) in the app itself. (This i
s also a question mark) The sub vi is already included, but the path isn't right. Please help and give an example if possible. Thanks, Madri
Download All
0 Kudos
Message 1 of 7
(3,212 Views)
You could use relative file paths. You can find them in the 'file constants'palette. E.g. 'VI library' returns the path to the VI library directory for the current instance of LabVIEW on the current computer. If you build the VI into an application, this function returns the path of the directory containing the application file. You can set the library directory on the Options dialog box.
0 Kudos
Message 2 of 7
(3,212 Views)
maybe
this
will help

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 7
(3,212 Views)
Insert this VI into the wire between the call to find the VI path and the "consumer" of that information.

It strips the offending part of the path that appears when you make an executable application. Otherwise, it does nothing.
0 Kudos
Message 4 of 7
(3,212 Views)
Hi, Thank you for the reply! How would I then know the path of a specific vi or file?
Madri
0 Kudos
Message 5 of 7
(3,212 Views)
You simply connect the VI as shown in the example. The correct file path appears at the output connector. To get the folder, use the "strip path" VI from the block diagram palette. You can also use the same VI I used in the example to break the path into separate strings.

Experiments are allowed.
0 Kudos
Message 6 of 7
(3,212 Views)
Thanks for the great help! I just couldn't figure it out. Stupid, but I didn't know about the 'strip path' vi - just didn't know how to put my question to get my answer. Didn't put it so well, but you got there :-). Figured LabVIEW must have something in that direction...

Thanks again,
Madri
0 Kudos
Message 7 of 7
(3,212 Views)