DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ExportToImage settings

Hi,

 

I'm using ExportToImage, in place of the now obsolete PicExport, and the help pages tell you to specify the settings relevant for the format you're saving (EMF in my case). The pages guide you to an address: DIAdem REPORT  > DIAdem REPORT Settings  > Save Graphics - Properties, which lists all the properties familiar to users of PicExport, such as Height, Width, Compression, and so on. If I recall correctly, these properties could also be adjusted using an Options button in the save graphic dialogue box, which is also referenced in the help pages.

However, the Options button doesn't seem to exist anymore and I can't see how it's possible to use the settings properties in ExportToImage when this function only allows for two arguments - the filename and the imagetype. So, how do I set the settings for an image export in DIAdem 2019?

Thanks, Simon.

0 Kudos
Message 1 of 9
(2,371 Views)

Hi Simon,

 

I went back to DIAdem 2015, but didn't see the "options" button in the save as graphic export dialog.  I am familiar with this GUI in the print dialog, though.  I haven't tried this in DIAdem 2019 yet, but each configuration dialog in DIAdem, like this one in REPORT, stores your entries in global variables after you hit <OK> on the dialog.  So you should be able to set those old DIAdem variables prior to running that command, and it should use those variable values, even if the dialog is gone.  Here are a few to try:

 

PrintLeftMarg = 0.181
PrintTopMarg = 0.181
PrintWidth = 10.67
PrintHeigth = 7

 

Brad Turpin

Senior Technical Support Engineer

National Instruments

0 Kudos
Message 2 of 9
(2,293 Views)

Hi Brad,

 

I apologise but the 'options' button seems to be a false memory, perhaps from a different application. Either way, the real problem is the apparent inability to control the graphic export quality using the ExportToImage function that's replaced PicExport. How do I set the height and width, and, in the case of raster files, the bit depth and compression?

 

Thanks, Simon.

0 Kudos
Message 3 of 9
(2,286 Views)

Hi Brad,

 

Do you have any thoughts on this problem? I could really do with getting back to the higher quality image exports that previous versions of DIAdem used to provide.

 

Regards,

 

Simon.

0 Kudos
Message 4 of 9
(2,224 Views)

Hi Simon,

 

I have verified with DIAdem 2019 SP1 that when you interactively create a picture file in the REPORT panel, the selections in the pop-up dialog do, in fact, determine the size and resolution of the resulting image file.  When I hit <Ctrl-Shift-C> during the pop-up dialog session, the following variables are recorded (except for *.emf output):

 

ExWidth
ExHeight
ExUseRatio
ExBitsPerPixel
ExCompressType
ExProgressive
ExQuality

 

I've played with this programmatically a bit, and it looks like not all of these variables are used for each type of export file.  What specific image file format are you wanting to create?

 

Brad Turpin

Senior Technical Support Engineer

National Instruments

 

0 Kudos
Message 5 of 9
(2,203 Views)

Hi Brad,

 

Thanks for the response. I'm most interested in exporting EMFs at the moment, although I use PNGs at other times. For the old PicExport function I would need to set just the height and width if exporting an EMF. Do I understand from your message that I now can't set the height and width of an EMF file?

 

I've tried to replicate your work using ctrl+shift+c but I can't find any reference to ExWidth and ExHeight. Can you tell me what dialogue box you have open when you press ctrl+shift+c?

 

How would you use ExWidth and ExHeight in script if they aren't arguments for ExportToImage?

 

Regards.

 

0 Kudos
Message 6 of 9
(2,194 Views)

Hi Brad, have you had any further luck with this issue?

 

Thanks, Simon.

0 Kudos
Message 7 of 9
(2,158 Views)

Hi Simon,

 

I too get no configuration dialog when I export an *.emf picture file from REPORT.  When I instead choose to export a *.png file, I do get a configuration dialog, and if I hit <Ctrl-Shift-C> while that dialog is up, I get the following global variables recorded:

 

ExWidth = 1024
ExHeight = 768
ExUseRatio = True
ExBitsPerPixel = 4
ExCompressType = 0
ExProgressive = 0
ExQuality = 75

 

I don't actually think all of those are used for the *.png export.  I believe these are a superset of all the global variables that ever get used for any picture file export.  Still, I'd expect from the dialog I see that the first 5 variables would affect the resulting image file.

 

Brad Turpin

Senior Technical Support Engineer

National Instruments

0 Kudos
Message 8 of 9
(2,129 Views)

Hi Brad,

 

So it seems my original post turns out to be a non-question. When I inherited the scripts we use, the function PicExport was used to control the export of graphics and, within this, the size of each file. It turns out that none of the arguments for PicExport, other than the filename and type, have any effect on WMFs or EMFs. For all these years, I've been labouring under the belief that the size of the WMFs/EMFs were controllable!

 

Sorry for the roundabout way of getting this resolved and thanks for your effort nonetheless.

 

Regards.

0 Kudos
Message 9 of 9
(2,107 Views)