TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 昨天 15:23 |
---|
签到天数: 69 天 [LV.6]常住居民II
管理员
- 积分
- 2704
|
static void asdkMyGroupMyCommand () {
// Put your command code here
ads_name ss;
if (RTNORM!=acedSSGet(NULL,NULL,NULL,NULL,ss))
{
return;
}
long slen;
acedSSLength(ss,&slen);
ads_name en;
AcDbObjectId id;
AcDbEntity* pEnt=NULL;
Acad::ErrorStatus es;
AcDbVoidPtrArray ids;
for (long i=0;i<slen;i++)
{
acedSSName(ss,i,en);
acdbGetObjectId(id,en);
es=acdbOpenAcDbEntity(pEnt,id,AcDb::kForWrite);
if (es==Acad::eOk);
{
es=pEnt->explode(ids);
}
if (pEnt!=NULL)
{
pEnt->close();
}
}
if (ids.isEmpty())
{
return;
}
int j=0;
AcDbBlockTableRecordPointer btr(curDoc()->database()->currentSpaceId(),AcDb::kForWrite);
if (btr.openStatus()!=Acad::eOk)
{
return;
}
bool flag=true;
while(flag)
{
pEnt=(AcDbEntity *)ids.at(j);
if (pEnt->explode(ids) !=Acad::eOk)
{
btr->appendAcDbEntity(pEnt);
pEnt->close();
}
j++;
if (j==ids.logicalLength())
flag=false;
}
} |
|