ExportingSize for architect plans (CadImage)

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
Bjoerk
Posts: 4
Joined: 28 Nov 2014, 13:19

ExportingSize for architect plans (CadImage)

Post by Bjoerk » 28 Nov 2014, 13:32

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

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

Re: ExportingSize for architect plans (CadImage)

Post by support » 28 Nov 2014, 20:30

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Bjoerk
Posts: 4
Joined: 28 Nov 2014, 13:19

Re: ExportingSize for architect plans (CadImage)

Post by Bjoerk » 29 Nov 2014, 15:50

OK. Thanx Mikhail. Can it be, you have a Factor 1,25 for AbsWidth and AbsHeight?

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

Re: ExportingSize for architect plans (CadImage)

Post by support » 01 Dec 2014, 16:26

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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply