Example Code

Use the Clipboard LabVIEW Method Node to save a picture Using LabVIEW

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

Download All

Overview

This example uses the Clipboard LabVIEW Method Node to get the content of the Clipboard, display it on the front panel, and save it as a BMP file.

 

Description

An event structure in a while loop allows you to monitor the front panel buttons change with minimal CPU usage. The copy button will allow the event that gets the content of the Clipboard and format it as a picture so it can be displayed on the front panel and saved as a picture (BMP here).

 

Requirements

  • LabVIEW 2013 (or compatible)

 

Steps to Implement or Execute Code

  1. Choose the path to the BMP file you want to read.
  2. Save a picture to your clipboard (you can use the print screen key). then click on the "Copy" button.
  3. Repeat this operation as many times as you need.

 

Additional Information or References VI Block Diagram

VI Snippet

clipboard.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

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