Path Information When Searching for SubVIs
I am unable to open a subVI when loading my program on a new computer. How does LabVIEW handle saving file paths for subVIs, and how can I modify the search paths?
For any particular VI, LabVIEW saves each of the SubVIs as a relative path from the main VI. When opening up a VI, LabVIEW will first use relative paths to locate its SubVIs. If the VIs are not in the same directory as the main VI, LabVIEW will then search for the missing subVIs according to the VI Search Path settings. You can configure the search paths by going to Tools»Options»Paths and selecting VI Search Path from the drop-down menu. By default, LabVIEW will look through the following locations in order (
If VIs were not found in the relative paths where LabVIEW expected them due to the SubVIs being moved, LabVIEW will notify you that changes have been detected by placing an asterisk next to the VI name in the window title bar. Saving the main VI afterwards will also save a new relative file path for the subVI.
Note: When saving a new copy of a VI, LabVIEW will save the relative path to the original SubVIs. Opening this SubVI later would search the relative paths before looking in its own directory for SubVIs. This can cause the main VI to reference the SubVIs in an unexpected location.
If you want to create a copy of an application that is independent from other versions, you can create a source distribution (refer to the Related Links section for more information). You could also copy the files to a new directory without opening them in LabVIEW.
LabVIEW Help: Adding a Directory to VI Search Path
LabVIEW Help: Setting Path Options
LabVIEW Help: Building a Source Distribution
Report Date: 08/21/2001
Last Updated: 04/30/2014
Document ID: 2CKGQ6G4