From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

diadem export jpg -excel

Solved!
Go to solution

I am trying to convert a Diadem 3d characteristic graph into a JPG (or other type) graphics file. When I do the export, Diadem crashes and needs to be restarted. The only message is : Diadem 2012 has stopped working.

 

The graph has a lot of data. A typical graph is 65,000 X 200 points. I am using the ExportToImage method. If I limit the graph to 65000 X 20 the export works. Watching the memory with task manager, I notice that when memory use gets above about 1000 MB the Diadem crashes. I have tried several other formats and report settings with no luck.

 

The crash only happens when I do the export. It is possible to display 2 of the 65000 X 200 graphs in Diadem without problems.   Doing this without calling ExportToImage requires 194 MB for Diadem

 

How can I export an image of this graph using a diadem script?

Does Diadem have a memory limit of 1000 MB?

Is there a way to get is to break up the export task so that it converts a little at a time?

Are other graphics format conversions less memory intensive?

What does this line do?                                 Report.Settings.ImageExport.JPG.Progressive = 5

Is there another function that export this graph to a file for me?

 

Here is the relevant code:

 

Report.Sheets(Dir).Activate

Set oMyReportObj = Report.ActiveSheet.Objects.Item(1) 'select 3d Characteristic                      ‘graph. It is the only object on that tab

 

Report.Settings.ImageExport.JPG.Quality = 50

Report.Settings.ImageExport.JPG.Height = 800

Report.Settings.ImageExport.JPG.Progressive = 5

Report.Settings.ImageExport.JPG.UseRatio = True

 

Call oMyReportObj.ExportToImage(Filename, eImageExportTypeJPG) 'Export the file

 

I am attaching a JPG created by export to image where the original was 65000 X 20.

 

 

0 Kudos
Message 1 of 4
(5,818 Views)

Hi FrankHS,

 

Your stated matrix of 65000x20 is unnecessarily dense.  You don't have 65000 pixels left to right on your screen.  What you're effectively asking DIAdem to do is draw somewhere between 30 and 50 different colors with each pixel.  No matter how fancy your monitor, each pixel can only show one color at a time.

 

I recommend that you map your 65000x20 matrix down to something like 650x20.  DIAdem has commands to do this.  It's important to store these down-mapped values into explicit channels in the Data Portal and not to ask the characteristic diagram to recalculate that down-mapping each time the graph refreshes.

 

Once you have a realistic matrix size I think you'll find the JPG export will work much better for you.  DIAdem 2014 and earlier are all 32bit applications and therefore limited to at most 2 GB of RAM, assuming you have that much free on your computer.  Note that this 32bit application limit includes the operating memory of the DIAdem application as well as the memory used by loaded channels in the Data Portal, etc.  As a result, it is quite possible that you are limited to 1 GB or so of RAM for the JPG export.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 2 of 4
(5,780 Views)
Solution
Accepted by topic author FrankHS

Hello Frank,

 

I second Brad's comments about the size of the matrix, since typical monitors are around 1,920x1,080 - very high resolution screens are 3,840 × 2,160, nowhere close to your 65,000 lines you are tying to plot for your matrix.

 

If you don't want to change the size of your matrix, you can try exporting this image using the 64-bit BETA version of DIAdem 2014, which can be found here:

 

http://ni.com/beta

 

You will have to sign up for the BETA program, but it's free and gives you access to the 64-bit version of DIAdem, which can access more ot your RAM, since it's not limited by the 32-bit addressable memory space. The 64-bit version will install in parallel to your current DIAdem 2012 version and should not affect the 32-bit version in a negative way.

 

Just out of curiosity, I wonder if the PDF export works for your data set. It uses vector graphics (vs. pixel based formats such as GIF or JPEG) and usually creates much smaller files. It also doesn't integrate with Excel as far as I know, so it's not really a solution to your current issue ...

 

Let us know how either reducing the matrix size or using the 64-bit version of DIAdem works out, and we can see if there are other/additional avenues we can explore.

 

Best regards,

 

     Otmar

Otmar D. Foehner
Message 3 of 4
(5,775 Views)

I agree about the size of the matrix and will discuss the possiblity of resizing it. Changing the size of the matrix would likely speed up the plotting of the graph. It takes about a minute with the large data set.

 

In the meantime There is a 3rd party utility, MiniCap, that will take a screenshot of the graph and create a JPG. I plot the graph and then call the utility from diadem. This will solve the problem if the 64 bit verson or changing the size of the matrix doesn't work out.

 

The PDF also crashes when tring to convert the large graph. I tried several formats from the diadem graphic export menu and they also crash with the large data set.

 

I'm not using excel. The message subject came from a search I was running on the message base.

 

I will give the 64 bit version a try.

 

Thank you, Otmar and Brad, for all the help you gave me on Diadem. NI tech support is the best!

0 Kudos
Message 4 of 4
(5,642 Views)