01-10-2012 07:58 AM
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.)
Solved! Go to Solution.
01-10-2012 09:16 AM
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
01-10-2012 10:36 AM
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.
01-10-2012 11:38 PM
The non-ActiveX 3D graph could export image by clipboard or file. Here is an example of exporting the image to Excel through clipboard.
01-11-2012 06:30 AM
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.)
01-11-2012 07:51 AM
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
01-11-2012 03:32 PM
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.
01-12-2012 06:57 AM
You are welcome.
And thank you for confirming that some of my memories are still valid.
Ben
01-12-2012 08:08 AM
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!!!!