Saving a LabVIEW Block Diagram as an Image

Updated Nov 8, 2023

Environment

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

This article shows how to save a LabVIEW block diagram as a standard image file so it can be viewed outside of LabVIEW or used in documentation.

You can create an image of a LabVIEW block diagram by:  

Manually printing the VI

To print the VI, use the following steps:
  1. Open the VI you want to generate a block diagram image for.
  2. Go to File » Print.
  3. Choose the VI or VIs you want to print.
  4. If you want just the image of the block diagram, choose Icon, description, panel and diagram. If you want full VI documentation, choose VI documentation. Click Next.
  5. If you choose VI documentation, ensure Block diagram is checked. If you want images of hidden frames (such as the frames in Case Structures, Event Structures, or Stacked Sequence Structures), ensure Hidden frames is checked. Press Next.
  6. Select HTML file as the destination. Press Next.
  7. Select the image format and color depth of the generated images. Press Save.
  8. Choose a location on disk to save the HTML file. The HTML file will be generated along with an image of the block diagram and separate images of each hidden frame.
 

Programmatically getting the block diagram image

To programmatically get the block diagram image, use the following steps:
  1. Open a VI reference to the VI you want to generate a block diagram image for.
  2. Use the Block Diagram: Get Image Scaled invoke node to obtain an image.
  3. Write the image data to a file using one of the Graphics Formats VI .
  4. Close the VI reference.
An example VI that accomplishes this can be seen below:


Please note that this method will not generate images for hidden frames.