Table Of Contents

Creating a Code Snippet

    Last Modified: April 10, 2020

    Use code snippets to store and share LabVIEW NXG code as PNG files that become graphical code when you drag them onto the diagram.

    1. Open a project.
    2. On the diagram, highlight the code you want to capture as a snippet.
    3. Click Edit»Create snippet from selection.
    4. Choose where to save the snippet, give it a descriptive name, and click Save.

      If you edit a snippet in an image editor, the editor will remove the VI information from the file and you will not be able to drop the snippet onto the diagram.


      Sharing snippets is most useful for simple code. If your snippet includes dependencies, such as subVIs or classes, anyone who uses your snippet must have those dependencies in their project or they will see a missing dependency error.

    Recently Viewed Topics