LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control to Clipboard

Solved!
Go to solution

Is there a way to copy a Control to the clipboard? As far as I discovered is is only possible to paste text to the windows clipboard. My intention is to create a little application that finds GPIB-Addresses from a definition file in the network and copies a VISA-Resource Control (or constant) to the clipboard. So, in any VI I can just run my little application which I start from the LabView-Menu, select my Device and have a VISA-Resource Constant or Control in the Clipboard So far the idea. It is possible to copy and paste a control from one VI to another - can this be done programmatically?

 

Thanks in advance.

 

Ben

0 Kudos
Message 1 of 7
(5,636 Views)

No need for anything so complicated. Read the file and populate a combo box by writing to it's Strings[] property.

0 Kudos
Message 2 of 7
(5,633 Views)

Yes, I know. But if I preferred the more complicated solution: is it possible at all?

0 Kudos
Message 3 of 7
(5,594 Views)

Hi benMyer,

  Please try to use the methods,like read from clipboard and write to clipboard (invoke Methods)..Please see the picture below..Screen_Resolution_BD.pngExample_VI_BD.png

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 7
(5,584 Views)

Yes, it's possible, with some scripting. This snippet shows how. It creates a constant, but you can paste a constant to a front panel. You can drag this into LV 2009 or later to turn it into functional code. I'm not sure I understand why you want this, though.

 

 

Select_and_Copy_VISA.png


___________________
Try to take over the world!
0 Kudos
Message 5 of 7
(5,575 Views)

Looks good. Dragging into LV2010 doesn't work - it's a PNG. Where do I find the second VI on the left (where the enumerator 'VISA Resource Name' is connected to)?

0 Kudos
Message 6 of 7
(5,566 Views)
Solution
Accepted by topic author benMyer

Not all browsers support the dragging option. Save the image to your hard drive, then drag it from there into an empty VI.

 

In general, to access the New VI Object primitive and other scripting options you need to enable scripting in the Options dialog (in 2010, in earlier versions you need to download the scripting API installer separately).


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(5,558 Views)