CADImport. ExportToMetafile() on Windows 8

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
fralam
Posts: 3
Joined: 02 Dec 2014, 19:41

CADImport. ExportToMetafile() on Windows 8

Post by fralam » 26 Jan 2015, 19:06

On Winwdows 8,

The method CADImport. ExportToMetafile( aName, aCurRect ) work corectly when Windows is set to 96 dpi or 120 dpi. But at 150 dbi, the scale of drawing is not good. The drawing et too smal.
I try to set the DPI before save, this did not settle the problem.

How can I correct this problem?

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: CADImport. ExportToMetafile() on Windows 8

Post by support » 27 Jan 2015, 16:36

Hello Francois,

We recommend to enlarge a rectangle area of the output metafile (aCurRect) by using some multiplier:

Code: Select all

double ratio;
...
DRect aCurRect = new DRect(0, 0, cadImage.AbsWidth * ratio, cadImage.AbsHeight * ratio);
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

fralam
Posts: 3
Joined: 02 Dec 2014, 19:41

Re: CADImport. ExportToMetafile() on Windows 8

Post by fralam » 27 Jan 2015, 23:24

There are a problem when the screen resolution is 2880x1620 (on Windows 8 ). I generate de bad EMF file with your exemple "ViewerDemo.exe".

I think that you have a bug :-)

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: CADImport. ExportToMetafile() on Windows 8

Post by support » 28 Jan 2015, 14:03

Hello Francois,

Thank you for the information.

We could reproduce this problem on lower screen resolution (Windows 7) when setting "Maximum recommended size" option in the Size dialog box in ViewerDemo application. Try the "Current size" option, it generates a correct EMF file with smaller sizes.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply