LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you change sub VIs to be referenced relatively as opposed to absolute paths?

When I drag and drop a subvi into my current VI it works perfectly.  However, the subVI has an absolute path that points to somebody else's code on my computer.  I would prefer not to point my code to somebody else's code because if they decide to delete their code or modify it, my own code becomes at risk of breaking.  Instead, I would like to create a duplicate of subVI and have my current Vi point to it relatively (i.e. using things like ../../subvi.vi).

 

How can I accomplish this in labview?

0 Kudos
Message 1 of 4
(2,708 Views)

Open the vi you want to be local and select: File->Save As...

 

Then chose a local destination.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 4
(2,698 Views)

Steve -

 

Does this still "hardcode" the abosolute file path?

 

 

0 Kudos
Message 3 of 4
(2,665 Views)

> Does this still "hardcode" the abosolute file path?

 

I think the right answer is yes and no Smiley Happy

 

Your main vi will remember the sub vi's file location relative to itself.

So you can move the folder containing the main vi and sub vi and main will have no trouble finding the sub vi.

 

If you move the sub vi to a folder under main using Window commands, main will notice that the sub vi is

not where it's supposed to be and try to find it.

If found, a warning is given. If not found it will ask you to Browse to it.

 

So it's absolute "relative" to main - not to the file system.

 

I hope this makes sense ...

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 4 of 4
(2,642 Views)