|
static void TESTinputcmd(){
CString outStr;
//acedGetReal
/*ads_real realNum;
acedGetReal(_T("输入一个实数"),&realNum);
outStr.Format(_T("%lf"),realNum);
acutPrintf(outStr);*/
//acedGetInt
/*int iNum;
acedGetInt(_T("输入一个整数"),&iNum);
outStr.Format(_T("%d"),iNum);
acutPrintf(outStr);*/
//acedGetString
/*TCHAR str[256];
acedGetString(0,_T("输入一个字符串"),str);
acutPrintf(str);*/
//acedGetKword
/* TCHAR kw[256];
acedGetKword(_T("输入一个关键字"),kw);
acutPrintf(kw);*/
//acedGetPoint
/* ads_point pt;
acedGetPoint(NULL,_T("输入一个点"),pt);
outStr.Format(_T("x:%f,y:%f"),pt[X],pt[Y]);
acutPrintf(outStr);*/
//acedGetCorner(要与ads_point联合使用,完成画矩形)
/*ads_point ptCorner;
acedGetCorner(pt,_T("输入对角点"),ptCorner);
outStr.Format(_T("x:%f,y:%f"),ptCorner[X],ptCorner[Y]);
acutPrintf(outStr);*/
//acedGetDist(和ads_point结合使用,实现画线)
/*ads_real ptReal;
acedGetDist(pt,_T("输入目标值"),&ptReal);
outStr.Format(_T("%lf"),ptReal);
acutPrintf(outStr);*/
//acedGetAngle(和ads_point结合使用,实现画线)
/* ads_real agReal;
acedGetAngle(pt,_T("输入一个角度"),&agReal);
outStr.Format(_T("%lf"),agReal);
acutPrintf(outStr);*/
}
选择对象
static BOOL SelObj(ads_point& pt,AcDbObjectId& objId){
ads_name en;
if(acedEntSel(_T("\n选择对象"),en,pt) != RTNORM){
return false;
}
Acad::ErrorStatus es = acdbGetObjectId(objId,en);
return es == Acad::ErrorStatus::eOk ? true : false;
} |
|