How To Programmatically Access the Clipboard From a VI?

Updated Aug 24, 2023



  • LabVIEW 8.0.1 Professional

I am writing a VI in which I want to share information with the system clipboard, through programmatic reads and writes on the system clipboard.  How can I do this?

There are methods of the Clipboard class called Read From Clipboard and Write to Clipboard which are used to read from and write to the system clipboard, respectively.  These methods can be executed in a VI by following the steps below:
  • Place an Invoke Node on the block diagram by bringing up the Functions Palette, and going to Programming»Application Control»Invoke Node
  • Select the method to be either Read From Clipboard or Write to Clipboard by selecting either Clipboard»Read From Clipboard or Clipboard»Write to Clipboard on the Invoke Node.

  • If writing to the clipboard, wire the string that you want to be written to the clipboard to the Text input terminal of the Invoke Node. If reading from the clipboard, the string which is read from the clipboard is output at the Clipboard.Read output terminal of the Invoke Node.  

Additional Information

As of LabVIEW 2010, you can access the clipboard through a right-click shortcut menu. To read more about this feature, see the Exporting Data and Images topic in the LabVIEW Help.