LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send control image programmatically to clipboard

Hi all
The right click option allows one to copy or export simplified image to clipboard.
Programmatically, "export simplified image "is not possible.
Using "invoke node", it is posible to save in a file as jpg/bmp/pmg.

Does somebody has a vi to copy graph control image programmatically to clipboard as jpg or emf?

thanks
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 1 of 16
(9,520 Views)
Here are acouple of VI's I got some time ago they are for text but maybe you can modify them for your need.



Joe.
"NOTHING IS EVER EASY"
Message 2 of 16
(9,504 Views)
Alipio,

There is no way to send a control image to clipboard as emf programmatically.

You can use invoke node to get the flattened image (bmp), and place it onto clipboard.
(see http://www.geocities.com/gzou999/imgtool.htm)
Or you can place an emf wrapped bmp onto clipboard.

I'm not sure about jpg. Last time I checked, there is no such definition for clipboard
data format.

George Zou
http://gtoolbox.yeah.net
George Zou
Message 3 of 16
(9,487 Views)
hummmmmmmmmmmm

thank a lot ( and stars)
I hope NI will implement this option for next version.
It seems very useful to document results.

Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 4 of 16
(9,463 Views)

Hello,

I have needed to programmatically copy image data to the clipboard too. In the past I have used George's toolset. However with Labview 8.5, you can do it. Attached is a snippet that shows how you can use the picture methods to export to either the clipboard or a file. Can't do it in either LV8, or LV8.2. Sad.

Message 5 of 16
(9,021 Views)
We used some free VIs from Rolf Kalbermatter to do this in the Code Capture Tool. The tool itself is released in 7.0 format, but the VIs will also work on older versions if back saved.

___________________
Try to take over the world!
Message 6 of 16
(9,008 Views)

tst:

Did you see Bart's VI?  He exports an EMF image format to clipboard, not BMP.

 

George Zou

George Zou
Message 7 of 16
(8,990 Views)


zou wrote:

Did you see Bart's VI?


No, sorry.
 
In any case, exporting bitmapped images to the clipboard is also a useful ability, so if anyone will come searching for it in the future, they will find it.
 
P.S. If anyone does run into this, the VIs I mentioned are Windows only, since they use Windows API functions to interact with the clipboard.

___________________
Try to take over the world!
0 Kudos
Message 8 of 16
(8,974 Views)
In 8.0 you can copy an image to clipboard by creating a method for the image and select export simplified image.
Message 9 of 16
(8,947 Views)

@Bart. Thank you for posting the example VI of how to push an image onto the clipboard. I have been hunting for sometime on how to achieve this in Linux (specifically openSUSE 11.3 running Labview 8.6) so that an image can then be pasted into OpenOffice. I am happy to say the method shown in your VI works well in Windows and Linux versions of LV8.6.

 

The only necessary change for Linux, is that BMP format needs to be used, as it appears that OpenOffice does not like PICT or EMF image type when pasting.

0 Kudos
Message 10 of 16
(7,775 Views)