The core of the problem is that when your MyVI.vi was saved, it stored the specific path to the VIs inside a.llb it was using. Simply copying a.llb to c.llb doesn't automatically update MyVI.vi's internal links.
You need to tell LabVIEW to "re-point" MyVI.vi to c.llb. Here are the most common and effective ways to do this, from simplest to most robust:
Important Pre-requisite: For these methods to work, the VIs inside c.llb must have the exact same names and hierarchy as the VIs inside a.llb that MyVI.vi is calling. If the internal names or paths are different, these methods won't work, and you'd have to manually replace each subVI call.
Method 1: The "Missing VIs" Dialog (Manual Re-linking)
This is often the quickest if a.llb isn't found.
- Close LabVIEW.
- Move or rename
a.llb to a different location or a different name (e.g., a_old.llb). This ensures LabVIEW won't find it.
- Open LabVIEW.
- Open
MyVI.vi.
- LabVIEW will likely pop up a dialog box indicating "Locate
a.llb" or "LabVIEW could not find the following file(s): a.llb".
- Click the "Browse..." or "Search..." button.
- Navigate to and select
c.llb.
- Click "OK" or "Select".
- LabVIEW should now re-link the VIs from
c.llb.
- Save
MyVI.vi to permanently update its internal links to c.llb.
Pros: Simple and direct.
Cons: Can be tedious if many VIs are missing individually rather than the whole LLB.
Method 2: Using the LabVIEW Project (Recommended for robust dependency management)
This is the most robust and recommended way to manage dependencies, especially for larger applications.
- Create a New LabVIEW Project:
- Go to
File -> Create Project...
- Select "Blank Project" and click "Finish".
- Add
MyVI.vi to the project:
- Right-click "My Computer" in the Project Explorer.
- Select
Add -> File...
- Navigate to and select
MyVI.vi.
- Add
c.llb to the project:
- Right-click "My Computer".
- Select
Add -> File...
- Navigate to and select
c.llb.
- Open
MyVI.vi from within the Project Explorer. (Double-click it in the project tree).
- At this point, LabVIEW often intelligently resolves dependencies within the project. If
MyVI.vi still shows broken wires or points to a.llb, proceed to the next step.
- Relink VIs (if necessary):
- Right-click on
MyVI.vi in the Project Explorer.
- Select
Replace With...
- In the dialog, navigate to
c.llb and then select the top-level VI within c.llb that MyVI.vi is using, or just c.llb itself if it's the main dependency.
- Alternatively, if you're seeing broken VIs, right-click on the broken subVI call on the block diagram and choose
Replace -> Browse... and then navigate to the equivalent VI inside c.llb.
- Mass Compile (Optional but recommended):
- Save your project (
File -> Save Project).
- With the project open, go to
Tools -> Advanced -> Mass Compile...
- Select the directory where
MyVI.vi and c.llb reside (or a common parent directory).
- Click "Mass Compile". This forces LabVIEW to recompile and relink all VIs in the specified directory, prioritizing VIs found in the project.
- Save
MyVI.vi (and the project) to save the updated links.
Pros: The most robust way to manage complex dependencies. Provides a clear overview of your project structure.
Cons: Requires using projects, which might be overkill for a very simple scenario.
Method 3: Mass Compile (Without a Project)
This method forces LabVIEW to re-evaluate all VIs in a specified directory.
- Ensure
c.llb is accessible: Place c.llb in the same directory as MyVI.vi, or in a subfolder, or in a location that LabVIEW normally searches (like vi.lib or user.lib but this is less recommended for custom LLBs).
- Move or rename
a.llb away from LabVIEW's search paths (e.g., move it to a backup folder outside your project directory).
- Open LabVIEW.
- Go to
Tools -> Advanced -> Mass Compile...
- Select the directory where
MyVI.vi and c.llb are located.
- Click "Mass Compile".
- LabVIEW will go through all VIs in that directory and attempt to re-resolve any missing dependencies. If it finds the VIs with the correct names inside
c.llb, it should relink.
- After the mass compile finishes, open
MyVI.vi. It should now be linked to c.llb.
- Save
MyVI.vi to make the changes permanent.
Pros: Can fix many broken links at once. Does not require creating a project.
Cons: Can be less predictable if multiple versions of the same VI exist in different LLBs in various search paths. Always back up before a mass compile.
Which Method to Choose?
- If
MyVI.vi is a standalone VI and you just need a quick fix, Method 1 (Missing VIs Dialog) is often the fastest.
- If you want to manage your code professionally, or if you have many VIs and LLBs, or if you plan to build an executable, Method 2 (Using the LabVIEW Project) is by far the best practice.
- If Method 1 doesn't quite work, or you have several VIs that need fixing and don't want to use a project, Method 3 (Mass Compile) is a powerful alternative.
Always make a backup of your MyVI.vi and both LLBs (a.llb and c.llb) before attempting any relinking process.