LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save 3d plot to excel as an image

Solved!
Go to solution

I am in the report phase of the project and would like to be able to save a 3D plot image (not the data) to an Excel spreadsheet. Any ideas? (The Print.Vi Invoke Node function methods for the front pane are not available in the RTE.)

0 Kudos
Message 1 of 9
(5,466 Views)

If you are using the CW 3D graph then see this thrad on how to insert the graph as an activeX object into PP which should also work with Excel.

 

If not the CW 3D graph then ... I have not suggestions.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 9
(5,458 Views)

Ben, thanks for the reply. While this does work by hand, it will not work programatically (on the Excel end). I can export the CWGraph programatically, which can help, but I am not so concerned about keeping the activeX component of the graph. I would be perfectly happy with an image of the 3D graph. Even if I could export or save the front panel as a jpg because I can then add a jpg image to the excel worksheet programatically.

0 Kudos
Message 3 of 9
(5,452 Views)

The non-ActiveX 3D graph could export image by clipboard or file. Here is an example of exporting the image to Excel through clipboard.

Message 4 of 9
(5,442 Views)

Thanks for the alternate solution Hanrock. I may decide to use a 3D Surface instead of a 3D Graph. (I am currently using a CWGraph3D object.)

0 Kudos
Message 5 of 9
(5,436 Views)
Solution
Accepted by topic author j.masse

This is rom memory so please forgive me if this is wrong...

 

The CW 3D graph runs in an activeX container so...

 

Go to the FP and pop-up on the container (ouside frame) and select "create reference". You MAY be able to use a invoke node "Get Image" that MAY be useful.

 

Have not tried it in years.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(5,432 Views)

Ben - with a little bit of TLC, your suggestion works. However the 'Get Image' only returns a 1D array of all the image data so you need to determine the amount of X and Y pixels, then reshape the 1D array to a 2D array. From there, image utilities will convert it to a jpg and then that can be imported into an Excel doc. Thanks.

Message 7 of 9
(5,414 Views)

You are welcome.

 

And thank you for confirming that some of my memories are still valid.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(5,394 Views)

Actually, I just found a very simple solution to Ben's suggestion. LabVIEW provides a Write JPG to File.vi. It uses the Image Data from the Get Image Invoke Method node. It copies an identical image of the 3D plot to a .jpg file!!!!

Message 9 of 9
(5,389 Views)