This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How Do I Create a LabVIEW VI Library that Automatically Includes All SubVIs?

Updated Nov 29, 2022



  • LabVIEW

I need to distribute a LabVIEW program that contains a number of subVIs, so I would like an easy way to create a library (with an extension of .llb) that will include all the necessary files. When I choose File»Save As and then New VI Library, the library will only include the main VI without any subVIs. Is there a way to automatically include these other VIs in the library?

There is an easy way to package all of your VIs in a LabVIEW VI Library (llb) file. Perform the following steps in order to add all of your VIs and subVIs into one library file:

LabVIEW 8.x and later

  1. Select File»Save As... to open the Save As dialog window. 
  2. Click on the bullet next to Duplicate hierarchy to new location (Note: this option will only be available when the VI you are saving has subVIs). 
  3. Click on New LLB in the Choose a Directory or LLB window. 
  4. Enter a name for your LLB and click Create.  

LabVIEW 7.x

  1. Go to File»Save with Options and the save with options window will open.
  2. Click on the bullet next to Development Distribution.
  3. If you wish to create a library for use in a stand-alone application to be used on a computer that does not have its own installation of LabVIEW and its own vi.lib file, then place a check next to the Include vi.lib files. This will save all the VIs in your program including those built-in VIs. (Note: This will change the bullet on the left side of the window to Custom Save.)
  4. If you want to save the VI and subVIs without their block diagrams so users cannot modify them, then select the Remove diagrams option. Do not select this option if you need to recompile a VI for a different platform or version of LabVIEW. You cannot recompile a VI without its block diagram.
  5. Click Save.

Additional Information

This will create a .llb file that contains all of the VIs and subVIs that were used in the program. You now have all of this in one, easy to distribute file. Saving changes to a VI in a library takes longer than saving changes to an individual VI, because the operating system must write the changes to a larger file. Saving changes to a large library also can increase memory requirements and decrease performance. Try to limit the size of each library to approximately 1 MB.

The following list describes advantages to saving VIs as libraries:

  • You can use up to 255 characters to name your files (Note: MAC OS 9.x or earlier limits you to 31 characters).
  • You can transfer a VI library to other platforms more easily than you can transfer multiple, individual VIs.
  • You can slightly reduce the file size of your project because VI libraries are compressed to reduce disk space requirements.
  • You can mark VIs in a library as top-level so when you open the library, LabVIEW automatically opens all the top-level VIs in that library.

Note: If you have the NI LabVIEW Professional Development System and have installed the necessary components, than you can also create shared libraries (DLLs) under the Tools menu. Refer to your LabVIEW help files for more information on this.