Table Of Contents

Publishing a Project to LabVIEW NXG

Last Modified: November 6, 2020

Add a LabVIEW NXG project that demonstrates the use of an add-on library to LabVIEW NXG as an example or template.

Before you begin, package your add-on library in LabVIEW NXG and create a LabVIEW project that demonstrates the use of your add-on library.
  1. Launch NI Package Builder.
  2. Select Add File to add an input using the Inputs pane. When a file or directory is added, NI Package Builder automatically performs discovery. After a file or directory has been added, Package Builder performs discovery, which adds the contents of a directory or the dependencies of a file as subitems. Discovery is also performed each time you build the solution. You can also perform discovery at any time by clicking the Discover All Items button in the toolbar. If, after inputs are added to the Input pane, the dependencies change, then perform discovery again by selecting Discover All Items.
  3. Select the .lvproject project that contains your example and click OK. Your project and project files appear in the Dependencies View pane.
  4. Select New Package in the Editor pane to create the first package or select New Package in the Packages pane for subsequent packages.
  5. Drag the project from the Dependencies View pane to the LabVIEW NXG [version] Addons folder in the Editor pane. This adds the project to the package within an auto-generated generic file structure.
  6. Rename the generic, italicized Company, Product, and Product[suffix] folders. NI recommends renaming the generic folders to your company and product name. If your project has an add-on library dependency, rename the generic folders to match the company and product names of your add-on library. For example, a template project should have its folder hierarchy renamed Example Company»Example Product»Example Product-tmpl. An example project should have its folder hierarchy renamed Example Company»Example Product»Example Product-xmpl.

    Refrain from renaming the %package-version% folder, which is replaced during the build with the package version number. Doing so may result in a name collision if you update and re-package your project.

  7. Specify your add-on library as a dependency for your project.
    1. Select Add Dependency.
    2. In the top right corner of the dialog box, use the pull-down to select All Packages (including hidden).
    3. Select Installed Packages and select the checkbox for your add-on library.
    4. Click the field under Relationship to activate a pull-down and select Depends for your package dependency.

      Refer to Defining Package Relationships for information about each relationship type.

    With the package dependency relationship set to Depends, users are required to install your add-on library to install your project.
  8. In the Packages pane, select the project package. You can now view the properties of the package.
  9. In the Properties pane, update the appropriate fields.
  10. Click the button beside the Publish examples to LabVIEW NXG field to open the Publish to LabVIEW NXG dialog box. The dialog box displays the category hierarchy of the Learning, Examples, and Templates tabs in LabVIEW NXG.
  11. Depending on where you want your project to show, expand Examples or Templates.

    Select Create New Category to add a new category to the Examples or Templates if you wish to group more than one project in one area.

  12. Specify the name and description that will show up in LabVIEW NXG and click OK.
  13. Drag the example or template project from the Unassigned column to the appropriate place in LabVIEW NXG and click Save.
  14. In the Packages pane, click Build All Packages. Your example or template has been published to LabVIEW NXG.
  15. Install the package you built.
  16. Launch LabVIEW NXG and confirm that your project appears as expected.

Recently Viewed Topics