Image properties ?

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

Moderators: SDS, support, admin

Post Reply
m.kommer
Posts: 2
Joined: 12 Dec 2005, 15:39
Location: France

Image properties ?

Post by m.kommer » 12 Dec 2005, 15:42

Is it possible to have the image properties ?
For exemple, get paper size (A0..A4 ? )

Thx

ps: under Delphi 7

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

Post by support » 12 Dec 2005, 18:50

Hello,

This is impossible to implement directly. But you can get the sizes of CAD images. For TsgDXFImage, TsgDWGImage, TsgSVGImage and TsgCGMImage:

Code: Select all

var
  vRect: TFRect;
...
begin
...
  vRect := TsgDXFImage(sgPaintBox.Picture.Graphic).Extents;
  ImageWidth := vRect.Right - vRect.Left;
  ImageHeight := vRect.Top - vRect.Bottom;
...
end;
<b>Note</b>:
the returned values are in inches if:

Code: Select all

TsgDXFImage(sgPaintBox.Picture.Graphic).CurrentLayout.PlotSettings.PlotPaperUnits = 0 
else in millimetres.

For TsgHPGLImage:

Code: Select all

     ImageWidth := TsgHPGLImage(sgPaintBox.Picture.Graphic).MMWidth / 100;
     ImageHeight := TsgHPGLImage(sgPaintBox.Picture.Graphic).MMHeight / 100;
<b>Note</b>:
the returned values are the 100-th shares of millimeter

Sergey.


please post questions to the forum or write to support@cadsofttools.com

m.kommer
Posts: 2
Joined: 12 Dec 2005, 15:39
Location: France

Post by m.kommer » 12 Dec 2005, 19:25

and by entity ? or directly in binaries files ?

i just would know if its possible to get informations about page properties to have the "real" dimensions to choose the good paper for printing...

thx for any help

nb: sorry for english

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

Post by support » 13 Dec 2005, 11:23

Hello,

They can get sizes of the drawing only when it has been loaded. Knowing sizes of the drawing and sizes of sheets they can select acceptable format of the sheet for printing.

Could you please explain in detail what tasks are standing before you for we'd find the easiest way to solve them.

Sergey.


please post questions to the forum or write to support@cadsofttools.com

Post Reply