Hi,
What is the equivalent Variable names in CadSoft Lib.
DIMDLE
DIMTAD I want to set Text above the dimension line.
Thanks
Aby
Moderators: admin, SDS, support
TsgDXFDimension *sgDms = new TsgDXFDimension;
sgDms->Flags = 0;
sgDms->LinDefPoint1 = MakeFPoint(0,0,0);
sgDms->LinDefPoint2 = MakeFPoint(100,0,0);
sgDms->DefPoint = MakeFPoint(100,-25,0);
sgDms->MiddlePoint = MakeFPoint(50,-25,0);
// sgDms->Style = ProDim->Style;
// sgDms->TextStyle = ProDim->TextStyle;
sgDms->ArrowType1 = 5;
sgDms->ArrowType2 = 5;
sgDms->ArrowSize = 6;
sgDms->TextHeight = 12.5;
sgDms->Precision = 0;
sgDms->ExtLineOffset = 4;
sgDms->ExtLineExt = 4;
sgDms->TextPosVert = 3; // This line was already given before your post
sgDms->Layer = ProDim->Layer;
FCADImage->CurrentLayout->AddEntity(sgDms);
FCADImage->Converter->Loads(sgDms);
FCADImage->RefreshCurrentLayout();
FCADImage->GetExtents();
TGraphic *vGr =(FDwgNavigator->Picture->Graphic);
int vWidth = vGr->Width;
int vHeight = vGr->Height;
double vRatio = (vHeight) ? (double)vWidth / vHeight : 1.0;
if (vRatio <= 1.0) {
vHeight = Screen->Height;
vWidth = Ceil(vHeight * vRatio);
} else {
vWidth = Screen->Width;
vHeight = Ceil(vWidth / vRatio);
}
TsgCADtoDXF *ExpCadFile(new TsgCADtoDXF( dynamic_cast<TsgDXFImage *> (vGr)));
ExpCadFile->SaveToFile(FResFileName);
sgDms->TextPosVert = 3;Currently you don't need any information from us if you use BCB. It's not necessary to use enumeration in BCB for current library version, you can just set this property as integer. It corresponds to AutoCAD DIMTAD integer values. However, using of enumeration types is more correct way. If our TsgDimTextPosVert enumeration will be changed in the future versions and it won't correspond to AutoCAD type, we will note this fact in our library.Your reply to my post was "TextPosVert name in CAD Import VCL is equivalent to DIMTAD name of AutoCAD."
There was no information about what the property value must be.
I've wrongly guessed and treated that this type is an integer."
No, that's not correct. AutoCAD DIMTAD doesn't set neither units above the text line no any units. There is the DIMGAP in AutoCAD for such purpose. Our lib have equivalent TextOffset property.if I supply the value 3, it would draw the text 3 units above the text line,
like in AutoCad when you change DIMTAD variable- as units -.
Return to CADImportVCL + DXFExportVCL
Users browsing this forum: No registered users and 0 guests