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
- Select File»Save As... to open the Save As dialog window.
- 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).
- Click on New LLB in the Choose a Directory or LLB window.
- Enter a name for your LLB and click Create.
- Go to File»Save with Options and the save with options window will open.
- Click on the bullet next to Development Distribution.
- 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.)
- 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.
- Click Save.
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.