|
[code]ads_name ent;
ads_point pt;
if (RTNORM != acedEntSel(_T("\n选择对象: "),ent,pt))
{
return;
}
AcDbObjectId objId;
acdbGetObjectId(objId,ent);
AcDbObjectPointer<AcDbDimension>pDim(objId,AcDb::kForWrite);
Acad::ErrorStatus es=pDim.openStatus();
if (Acad::eOk != es)
{
return;
}
//开启公差
pDim->setDimtol(true);
//DIMLIM
//pDim->setDimlim(true);
//居中对齐
pDim->setDimtolj(1);
//公差下标
pDim->setDimtm(0.01);
//公差上标
pDim->setDimtp(0.02);
//公差高度比例
pDim->setDimtfac(0.7);
[/code] |
|