Example Code

Export A Screenshot Of A Graph/Chart/Front Panel To The Clipboard

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to export a screenshot of a graph/chart or the complete Front Panel to the clipboard. 

 

Description

It is sometimes useful to export a screenshot of a graph/chart or the full Front Panel to the Windows clipboard for documentation purposes. LabVIEW is able to export the data to the clipboard if you use the picture class. 

This example provides a ready-to-use SubVI which you could use in your application and a Main VI to demonstrate the functionality.


Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the [Main] ...VI and follow the instructions on the Front Panel

 

Additional Information or References

[Main] Test Export Function - Front Panel.png

 

[Main] Test Export Function - Block Diagram.png
 

For sending strings of characters to the clipboard see KnowledgeBase 4SSFET1V: How can I Programmatically Access the Clipboard From a VI?

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Thank You
Eric Reid
National Instruments
Motion R&D

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Jack_A.
Active Participant
Active Participant
on

To have this work in a subVI, you'll need to change the VI properties to "show front panel when opened" and then "close when finished".  Also, set the window transparency to 100% so you can't see the VI when it's opened.  This is to get around an issue that is described in this discussion forum:

http://forums.ni.com/ni/board/message?board.id=170&thread.id=426022&view=by_date_ascending&page=1

-Jack