Page 1 of 1

Image properties ?

Posted: 12 Dec 2005, 15:42
by m.kommer
Is it possible to have the image properties ?
For exemple, get paper size (A0..A4 ? )

Thx

ps: under Delphi 7

Posted: 12 Dec 2005, 18:50
by support
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

Posted: 12 Dec 2005, 19:25
by m.kommer
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

Posted: 13 Dec 2005, 11:23
by support
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