- 积分
- 1423
- 明经币
- 个
- 注册时间
- 2003-8-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
ads_name en;
int rc;
ads_point pt;
rc=acedEntSel("\n Select a polyline:",en,pt);
if(rc!=RTNORM)
{
ads_printf("\nError during object selection");
return;
}
double m_measure;
AcDbObjectId eId;
acdbGetObjectId(eId,en);
AcDbObject *pObj;
acdbOpenObject(pObj,eId,AcDb::kForRead);
AcDbFcf *ObjDim; //这个临时变量用于存放转换为公差标注类型的实体
if(pObj->isKindOf(AcDbFcf::desc()))
{
ObjDim = AcDbFcf::cast(pObj);
m_measure=ObjDim->dimscale();
ObjDim->close();
pObj->close();
}
acutPrintf("\n dimscale is %.2f",m_measure); |
|