LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a graph to a clipboard (conserving colors info)

Hi everybody,
I'm looking for a way (also not conventional)to copy on clipboard a graph, without loose the colors information.

Someone can help me?

Many thanks
Neona
0 Kudos
Message 1 of 8
(3,170 Views)
Hi,

what is the problem you are seeing exactly?
If you post
- a VI with a graph on it
- an image where you copied the Graph from the VI above that shows you lost color info

we might be able to help you.
Regards,

AlessioD
National Instruments
0 Kudos
Message 2 of 8
(3,137 Views)
Hi Alessio,
I'd like to store a Graph image in the Clipboard RUN TIME (pressing a button), an then for instance copy it in a PowerPoint page or something else by pressing Ctrl+V. I saw that there is the possibility to copy the graph in the clipboard but in a simplified image "Export simplified Image..." see picture "From LV.bmp". My target is to have the picture like "target.bmp".

An example graph is in the attached vi.

Many thanks in advance.

Regards
Neona
0 Kudos
Message 3 of 8
(3,125 Views)
Neona,

If you absolutely must do this in response to a user clicking a front-panel button, as suggested in your attached example, then you'll need to hunt down some code. Programmatically, the built-in LabVIEW functions will take you only so far as getting the full-color image data (Right-click on your graph and choose Create >> Invoke Node, then select the Get Image method from that node), but not sending it to the clipboard.

George Zou has created VIs to do this exact thing (send image data from LabVIEW to the clipboard), but I haven't used them and I'm fairly sure they are not free. Plus, I think his main site is down right at the moment. See this thread.

There's a much easier solution. If you're willing to ask your users to right-click the graph and choose Copy Data at run-time, then that will copy a nice full-color image of the graph to the clipboard, and you can paste it into PPT, etc, as you desire. It's not quite clicking a button, but it's comparably easy.

Regards,
John
0 Kudos
Message 4 of 8
(3,107 Views)
Hi John,
many thanks for your appropriate response, I'll use the pop-up menu of the graph.

Best Regards
Neona
0 Kudos
Message 5 of 8
(3,100 Views)
Neona, I was interested in that option (.emf graph).
Please, ask NI to implement that option in next Labview version( Labview zone- Wishes for next version, I guess). I did. If there are many requests, they will do that. If now that functionality is possible in a pop-up menu, should be quite easy a programmatically implemantation.

Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 6 of 8
(3,093 Views)
Hi Neona
This is the answer for your post and mine. After some googling, I found the solution to copy a graph to clipboard.
using 24 bits color, the graph is as in labview. Using 1 bit, the graph is a simplified b/w picture.
this is the link: http://labview.citeng.com/pagesNL/labview/app.aspx
the file is "ctrlrefs.zip". Needs some work to update for Lv 7, but runs fine.

Hope it helps
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 7 of 8
(3,057 Views)
Hallo Alipio,
that is what I needed!!!
Many Thanks for your hint!
c-u soon

Neona
0 Kudos
Message 8 of 8
(3,023 Views)