LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying the Universal path, while defining constant path

Hello All,
 
               Whenever I am declaring the constant path, i have to define the path like "E:/ New folder/......vi", which can't be run whenever i shift my project to another pc or if i run the application at another pc, so is there any other possibilities to define the path so that it can be defined as the universal path that, whenever it runs, it take that vi from that universal path, not from static path.
 
Thank you,
Rujuta
0 Kudos
Message 1 of 7
(3,309 Views)

Hi Rujuta,

If you are talking about set of VI's (main VI and sub VI) that form a part of an application, this is what u can do

Save your main VI as development /application distribution

This way all your relevant VI's will be saved in a single library folder and you should be able to take this library file across systems and your sbu Vi's will always be loaded from this folder

Regards

Dev

 

 

0 Kudos
Message 2 of 7
(3,305 Views)
Hello Ruju,

in the file palette you will find path constants. One of them is called "current vi's path".
Save your work as library, when you move your project to different pc's. The main vi sets a global using the mentioned path constant. All subVis can access this global and build their path variables.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 7
(3,299 Views)

Hiii Dev,

           I don't understand what you are trying to say, "Save your main VI as development /application distribution" what does it mean? how to save the vi, by that method? i dont have any idea about that.

Thank you,

Rujuta

0 Kudos
Message 4 of 7
(3,293 Views)
Hello Ruju,

Dev means: save your application using the menu entry "Save with options". Then you can choose several options, "development dist." or "application dist." are among them.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(3,289 Views)
Thanks GerdW for explaining that! Smiley Happy
0 Kudos
Message 6 of 7
(3,285 Views)

Hi friends,

               What problem you are facing now, i was facing that long back. So finally i came with good method. 

         

In projects always use relative path instead of absoute path. In the same folder create one udl file & for your VI create path for UDL file as follow...

 

#1 > use for build path(From shortcut menu)

#2 > First(Top) path input use as application directory.vi..

#3 > in the second(Below) input type only udl file name with extension.

#4 > Output will be always relative.............

 

                                          Now you can also verify this folder into another directory or other PC as well.

 

With Regards

Ranjeet Singh 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 7
(2,913 Views)