Page 1 of 1

What is Unit?

Posted: 24 Nov 2005, 08:48
by mangchy
Hi!
C++ Builder 6.0
CADImportVCL

What is unit?

Posted: 24 Nov 2005, 11:14
by support
Hello,

Folder CADImportVCL\CBuilder\Units contains forms and unit files of demos common for C++Builder 4, C++Builder 5 and C++Builder 6. Folders:
CADImportVCL\CBuilder\BCB4
CADImportVCL\CBuilder\BCB5
CADImportVCL\CBuilder\BCB6
contain separate libraries and project files of demos for different versions of C++Builder.

Sergey.

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

Posted: 24 Nov 2005, 16:04
by mangchy
Ok, I'm sorry.
Want to know distance unit of graphic image..mm? inch? ..



<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by support</i>
<br />Hello,

Folder CADImportVCL\CBuilder\Units contains forms and unit files of demos common for C++Builder 4, C++Builder 5 and C++Builder 6. Folders:
CADImportVCL\CBuilder\BCB4
CADImportVCL\CBuilder\BCB5
CADImportVCL\CBuilder\BCB6
contain separate libraries and project files of demos for different versions of C++Builder.

Sergey.

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

<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Posted: 24 Nov 2005, 18:38
by support
Hello,

For DXF и DWG files:
(TsgDXFImage*)(sgPaintBox->Picture->Graphic)->CurrentLayout->PlotSettings.PlotPaperUnits
if (PlotPareUnits==0) then inches, otherwise millimeters.

For HPGL files:
The size of file in millimeters may be obtain using
(TsgHPGLImage *)(sgPaintBox->Picture->Graphic)->MMWidth / 100.

void TForm1::SetPnlSizeCaption(void)
{
TFPoint vPt;
TsgDXFImage *vImg;
TsgHPGLImage *vHPGLImg;
if (!sgPaintBox->Empty())
{
if (sgPaintBox->Picture->Graphic->ClassType() == __classid(TsgHPGLImage))
{
vHPGLImg = (TsgHPGLImage *)(sgPaintBox->Picture->Graphic);
TVarRec v1[] = {vHPGLImg->MMWidth / 100.0, vHPGLImg->MMHeight / 100.0};
pnlSize->Caption = Format("%.3f mm x %.3f mm", v1, 1);
}
else
if (sgPaintBox->Picture->Graphic->InheritsFrom(__classid(TsgDXFImage)))
{
vImg = (TsgDXFImage *)(sgPaintBox->Picture->Graphic);
TVarRec v[] = {vImg->AbsWidth(), vImg->AbsHeight()};
if (vImg->CurrentLayout->PlotSettings.PlotPaperUnits == 0)
pnlSize->Caption = Format("%.3f in x %.3f in", v, 1);
else
pnlSize->Caption = Format("%.3f mm x %.3f mm", v, 1);
}
}
}


Sergey.

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

Posted: 07 Dec 2005, 13:52
by mangchy
Thank you!


<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by support</i>
<br />Hello,

For DXF ?DWG files:
(TsgDXFImage*)(sgPaintBox->Picture->Graphic)->CurrentLayout->PlotSettings.PlotPaperUnits
if (PlotPareUnits==0) then inches, otherwise millimeters.

For HPGL files:
The size of file in millimeters may be obtain using
(TsgHPGLImage *)(sgPaintBox->Picture->Graphic)->MMWidth / 100.

void TForm1::SetPnlSizeCaption(void)
{
TFPoint vPt;
TsgDXFImage *vImg;
TsgHPGLImage *vHPGLImg;
if (!sgPaintBox->Empty())
{
if (sgPaintBox->Picture->Graphic->ClassType() == __classid(TsgHPGLImage))
{
vHPGLImg = (TsgHPGLImage *)(sgPaintBox->Picture->Graphic);
TVarRec v1[] = {vHPGLImg->MMWidth / 100.0, vHPGLImg->MMHeight / 100.0};
pnlSize->Caption = Format("%.3f mm x %.3f mm", v1, 1);
}
else
if (sgPaintBox->Picture->Graphic->InheritsFrom(__classid(TsgDXFImage)))
{
vImg = (TsgDXFImage *)(sgPaintBox->Picture->Graphic);
TVarRec v[] = {vImg->AbsWidth(), vImg->AbsHeight()};
if (vImg->CurrentLayout->PlotSettings.PlotPaperUnits == 0)
pnlSize->Caption = Format("%.3f in x %.3f in", v, 1);
else
pnlSize->Caption = Format("%.3f mm x %.3f mm", v, 1);
}
}
}


Sergey.

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

<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">