1. Launch LabVIEW 2018 or later.
    Note To use a VI created in a version of LabVIEW later than 2018, save the VI for a previous version. Refer to the LabVIEW Help for more information about saving for a previous version. A VI that requires a licensed development toolkit cannot be saved for a previous version of LabVIEW.
    Note When working with real-time targets, add the target to the project in LabVIEW Real-Time Mode and complete the following steps within the context of the target listed in the project.
  2. Open the VI. If the VI is already open, save the VI.
  3. Select File » New Project.
  4. Add the VI and any dependencies to the project.
  5. If a .dll file is listed under Dependencies, but is not located in the Windows directory, move the file to the same level as the included VIs.
    Note The VI will not save for distribution correctly if you fail to perform steps 4 and 5.
  6. Save the project by selecting File » Save Project.
  7. Right-click Build Specifications underneath the VI you added to the project and select New » Source Distribution from the shortcut menu to display the Source Distribution Properties dialog box.
  8. Enter a Build Specification Name and a Destination Directory.
  9. Select the Source Files category.
  10. In the Project Files list, select any .dll files. Add the files to the Always Excluded list.
    Note System .dll files are not included in the compiled LLB.
  11. In the Project Files list, select the top level VIs used in the Vision Builder AI Run LabVIEW VI steps and add the files to the Always Included list.
    Note Placing all VIs and subVIs used by the inspection in a single LabVIEW project allows the VIs to share common dependencies, which may reduce the load time and memory requirements for your inspection. Creating a single LLB also simplifies the process of copying the inspection to another computer.
  12. Select the Destinations category.
  13. In the Destination type control, select LLB.
  14. Select the Source Files Settings category.
  15. In the Project Files list, click Dependencies.
  16. Enable the Apply prefix to all contained items checkbox and enter a prefix.
  17. Select the Additional Exclusions category and enable the following checkboxes:
    • Disconnect type definitions
    • Remove unused polymorphic VI instances
    • Remove unused members of project libraries
    • Modify project library file after removing unused members
    • Exclude dependent packed libraries
    • Exclude dependent shared libraries
    Note If you are using a version of LabVIEW earlier than LabVIEW 2018, disable the Modify project library file after removing unused members checkbox.
  18. Disable the following checkboxes:
    • Exclude files from VI.lib
    • Exclude files from instr.lib
    • Exclude files from user.lib
  19. Select the Preview category. Click Generate Preview to review the generated file hierarchy for the source distribution. To ensure the preview is accurate, save changes to VIs in memory before you create or edit a build specification.
  20. Click Build. You can find the resulting source distribution in the directory specified in the Destination directory control in the Information category of the build specification.
Tip The manufacturer recommends using WebDAV to transfer files to and from a remote target.