Creating a Code Snippet

Use code snippets to store and share G Web Development Software 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.
    Note 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.
    Tip 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.