06-12-2013 07:13 PM - edited 06-12-2013 07:14 PM
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?
06-12-2013 07:42 PM
Open the vi you want to be local and select: File->Save As...
Then chose a local destination.
steve
06-13-2013 11:27 AM
Steve -
Does this still "hardcode" the abosolute file path?
06-13-2013 03:07 PM
> Does this still "hardcode" the abosolute file path?
I think the right answer is yes and no
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 ...