arx提取公差标注信息
ads_nameen;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); 哦,忘了加头文件,以下的头文件有冗余!
#include "rxregsvc.h"
#include "dbsymtb.h"
#include "dbents.h"
#include "dbapserv.h"
#include "adslib.h"
#include "dbidmap.h"
#include "lngtrans.h"
#include "dbltrans.h"
#include "dbmain.h"
#include "aced.h"
#include "dbfcf.h" 有没有LISP语言的呀
页:
[1]