Page 1 of 1

ExportingSize for architect plans (CadImage)

Posted: 28 Nov 2014, 13:32
by Bjoerk
Hello dear CadVclTeam,

I use CadVcl 10 since some months. Mostly just for Reading dxf and dwg files and Exporting as Metafile A. This Metafile A, I Draw lateron on a Metafile B as BackgroundPicture for further drawing on Mefafile B.

My dwg’s and dxf’s are architect plans and they are in scale, for example 1: 20. That means that a 1 m Line is 50 mm on the plan. I’m wondering, is there any change to get the right ExportingSize for Metafile A. Hope is understandable?

Kind regards
Thomas

Re: ExportingSize for architect plans (CadImage)

Posted: 28 Nov 2014, 20:30
by support
Hello Thomas,

DXF/DWG drawings are measured in drawing units. One drawing unit could represent one millimetre, one centimetre, one metre, etc. The units of measurement are set in AutoCAD. However, a metafile width and height values are in pixels, it doesn't relate to the real-world distance represented by one drawing unit. If you draw in scale 1:20, you should miltiply DXF/DWG drawing width (TsgCADImage.AbsWidth) and height (TsgCADImage.AbsHeight) by 20 to get the "real-world" size in pixels for the output metafile. For example, a line, which is 50 drawing units on the plan, will be 1000 pixels on the output metafile.

The bottom line: the metafile size in pixels can't be calculated from the measurement units (millimeters, meters, etc.), it only depends on decimal drawing units.


Mikhail

Re: ExportingSize for architect plans (CadImage)

Posted: 29 Nov 2014, 15:50
by Bjoerk
OK. Thanx Mikhail. Can it be, you have a Factor 1,25 for AbsWidth and AbsHeight?

Re: ExportingSize for architect plans (CadImage)

Posted: 01 Dec 2014, 16:26
by support
Hello Thomas,

Drawing may contain the additional empty space (borders) that affects its width and height. TsgCADImage.IsWithoutBorder property specifies whether to add a border or not, the border size can be set using the TsgCADImage.BorderSize property. The border size is defined in global points or ratio that's specified by the TsgCADImage.BorderType property.


Mikhail