Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
65 ratings:
 4.58 out of 5     Rate this Document

Exporting a LabVIEW Graph or Chart to Image File



Primary Software:
Primary Software Version: 2010
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems>>LabVIEW Full Development System, LabVIEW Development Systems>>LabVIEW Base Package

Problem:
How can I save a graph or chart in LabVIEW to an image file on my computer?

Solution:
Use one of the following options to save a graph or chart to image file:
  • Manually From the Front Panel

    1. Right-click the waveform graph or chart and select Export»Export Simplified Image from the shortcut menu.
    2. A dialog box will prompt you to select the image file type and destination.
This will produce a simplified, black-and-white image of the graph or chart.  

  • Programmatically with the Export Image Method

    1. From the block diagram, right-click the waveform graph or chart.
    2. Select Create»Invoke Node»Export Image from the shortcut menu.
    3. Specify the Target, File Type, and Path as shown in the following screenshot:

  • This will produce a simplified, black-and-white image of the graph or chart in the same style as created by manually exporting the image from the front panel.


    Note:
     The Export Image Method will not create the image file if the front panel is closed. This is commonly occurs when using this method used in a closed subVI. If this is a concern for you, consider using the Get Image Method. Also, you can configure the subVI to open the front panel when called by clicking File»VI Properties»Category»Window Appearance»Customize»Show Front Panel When Called.
  • Programmatically with the Get Image Method

    1. From the block diagram, right-click the waveform graph or chart.
    2. Select Create»Invoke Node»Get Image from the shortcut menu.
    3. Add the Write JPEG File, Write BMP File, or Write PNG File VI to the block diagram from the Graphics Formats palette.
    4. Wire the Image Data output of the Get Image Invoke Node to the Image Data input of one of the write image file VIs, as shown in the following screenshot:

This will produce an image exactly as the graph appears on the front panel.

Note: Unlike the Export Image Method, the Get Image Method is capable of generating an image even if the front panel is closed.

Note: When using the Export Image Method or the Get Image Method, LabVIEW uses the current data and properties of the graph or chart at the time the Invoke Node executes. Monitor the data to ensure LabVIEW takes creates the image at the time you desire.



Related Links:
LabVIEW 2012 Help: Exporting Data and Images
LabVIEW 2012 Help: Export Image Method
KnowledgeBase 51L8A7DK: How Can I Export an Image of the Data View in SignalExpress 2009?

Attachments:





Report Date: 03/09/2005
Last Updated: 08/14/2013
Document ID: 3J8F7RFJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit