Saving a LabVIEW Block Diagram as an Image

Updated Nov 29, 2017

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Issue Details

I would like to save a LabVIEW block diagram as a standard image file so it can be viewed outside of LabVIEW or used in documentation. How can I generate my block diagram as an image?

Solution

You can create an image of a LabVIEW block diagram by printing the VI or programmatically getting the block diagram image.

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.
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.

WAS THIS ARTICLE HELPFUL?

Not Helpful