From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI's changing locations when doing a mass compile

We often perform a mass compile on all our vi's. When viewing the log file, I noticed that subVI's were being loaded from directories that are not in the search path and the path where the subVI was expected to be was a valid location. If we ran the mass compile again, the locations of the subVI's would change again.
Example:
First mass compile - subVI was expected at path A was loaded from path B.
Second mass compile - subVI was expected at path B was loaded from path A.
I am not fully understanding where subVI's are being loaded from during mass compiles. I thought by limiting the VI search path would solve this.
Can someone lend some insight into this problem?
Thanks.
Message 1 of 5
(2,599 Views)
Hi J.

Before you do a mass compile do you perform also a "save with option", to a new llb and including ALL the vis (check all the radio buttons).

This ensures that all the VIs you are using are really located where you think they are.
It would be nice if you take the time to rate this answer
http://www.machinevision.ch
0 Kudos
Message 2 of 5
(2,595 Views)
Maybe I should have mentioned what I meant by "all our vi's". We have over 1500 vi's within our software. We are also on a UNIX platform. All our vi's reside under a typical UNIX directory structure. Because of the way we utilize our vi's, none of them reside in llb's. And I am sure that none of them were saved with "Save with options".
I am just trying to understand how LabVIEW finds or searches for sub-VI's during a mass compile.

J. Bangasser
0 Kudos
Message 3 of 5
(2,571 Views)
Hi J. Bangasser,

When LabVIEW searches for a subVI, it does it in five steps:
  1. Searches the memory for already open VIs with the same name as the subVI
  2. Searches the subVIs relative path to the main VI
  3. Searches next to the main VI (same directory and level)
  4. Searches all directories that are within the directory of the main VI
  5. Searches all the "VI Search Paths" specified under "Tools » Options... » Paths" in the given order (from top to bottom)
Notice that the subVIs are not saved with an absolute path, but rather a relative path to the main VI. This is chosen to make distribution of VIs with subVIs easier since the absolute paths will always change.

Let me know if this makes any sense in your case, thanks.

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 4 of 5
(2,546 Views)
Phlip C.
A BIG thanks!  This is just what I wanted to know.  If the first thing that LabVIEW does when loading vi's is to look at the ones already in memory, this would explain why my sub vi locations jump around.
You have been a really big help!
Thanks,
J Bangasser
0 Kudos
Message 5 of 5
(2,528 Views)