LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling folders where Sub VIs are pulled from.

When running a top level VI it appears that if the sub VI in the current folder has an error, LabView version 7.1 searches the entire drive for an error free VI of the same name and uses that one instead with no notification that it went outside the active folder to get it.  How do I confine LabView to only look in the current folder or sub folders for a sub VI.
0 Kudos
Message 1 of 4
(2,611 Views)
I have to say I've never heard of LabVIEW behaving that way in the sense of preferring an error-free VI over one that has an error, both with the same name. In all likelyhood you have a linkage problem. You can configure the search paths from the LabVIEW options (Tools->Options->Paths). You should fix your hierarchy by:
  1. Set the search path so it uses the top-level directory of where you have your subVIs as the first location.
  2. Restart LabVIEW.
  3. Open your top-level VI. You will see where it grabs the VIs.
  4. Verify that the correct VIs were loaded by looking at the VI Hierarchy (Browse->Show VI Hierarchy, then from the View menu select "Show VI Path in Label").
If you see that VIs were pulled in from the wrong place:
  1. Close the top-level VI without saving any changes.
  2. Open the subVIs from the correct place.
  3. Open your top-level VI. It will use the VIs in memory.
  4. Re-verify the VI Hierarchy.
Once you're satisfied everything is linked correctly, save the top-level VI and all VIs.

At this point you will probably want to reset the search path to the default value so it doesn't screw up other projects you may work on in the future.
0 Kudos
Message 2 of 4
(2,602 Views)
The best solution to your problem is to not have two VIs on your computer with the same name. Then you don't have to worry about where the various "versions" of the files are located.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 4
(2,577 Views)
True, but sometimes that's inevitable, since it's easy to come up with a name for a VI that somebody else probably came up with also. That's why I typically name my VIs using a group-subgroup-name convention. Helps to avoid problems like this.
0 Kudos
Message 4 of 4
(2,561 Views)