Moving or Copying LabVIEW Libraries (.lvlib Files) to a Different Location

Updated Aug 30, 2023

Environment

Software

  • LabVIEW

​​​​Here we'll discuss how to replicate or move LabVIEW libraries without breaking the linkages within them. Here are some scenarios a user may want to achieve:
  • I've created a library that I want to copy and edit separately. How can I do this without breaking my VIs, dependencies or the original .lvlib?
  • My .lvlib is in the wrong place on disk. How can I move this without risking linkage issues?
  • I'm developing an application that is using LabVIEW libraries included in the LabVIEW vi.lib folder, however I don't need all of the VIs included the libraries. I would like to create a more efficient copy to meet my requirements.
  • If I move the library outside of vi.lib my project doesn't update accordingly and it is not able to find it.

Copying a .lvlib

You can use the following procedure to copy a library: 
  1. Open the library you want to edit. You can do this either by:
    • Open the .lvlib from your LabVIEW Project window.
    • Opening the .lvlib directly from the OS file explorer.
  2. Save a copy to a different location (Preferably the location you want to call it from).
    1. Select File >> Save As...
    2. Choose Copy and define the name for your copied library
    3. LvLibCopy.png
    4. Select Continue...
    5. In the OS Select a Directory window that opens, navigate to your new location to copy the library to.
    6. Select Save or Current Folder to finalise this.
    7. If copying from the vi.lib folder, ensure the new location is outside of the vi.lib directory.


Renaming a .lvlib

This is similar to the copy method, except if you chose the Rename feature it will copy all the files to the new location and delete the original.
More information is available in Renaming Files and Project Items.


Renaming the .lvlib via the OS

If you rename a library via the OS, the VI's included in the library will not update their name. You will see this dialog after attempting to load the VI. 
LibraryCopy.png
  1. Select Update to open the VI mentioned
  2. Save the VI to update its link to the new library name.

You can now edit your copied or renamed library as required.
Refer also to Adding Items to a LabVIEW Project if it is not already in your LabVIEW project.