- ads_name ename;
- ads_point ept;
- int ret = acedEntSel(_T("\n请选择一个实体:"),ename,ept);
- if (ret != RTNORM)
- {
- return;
- }
- //获取图元信息
- struct resbuf * pRb_ent = acdbEntGet(ename);
- while( pRb_ent->restype != 0)
- pRb_ent = pRb_ent->rbnext;
- CString TypeName;
- TypeName.Format(pRb_ent->resval.rstring);
- ret = acutRelRb(pRb_ent);
- struct resbuf *filter;
- filter = acutBuildList(RTDXF0, TypeName.GetBuffer(),RTNONE);
- ads_name ss;
- ret = acedSSGet(NULL,NULL,NULL,filter,ss);
- if (ret != RTNORM)
- return;
- ret = acutRelRb(filter);
- ret = acedSSSetFirst(ss, ss);
- ret = acedSSFree(ss);
|