- 积分
- 369
- 明经币
- 个
- 注册时间
- 2003-7-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
ads_name en; ads_point pt; AcDbObjectId eId,pId; AcDbVoidPtrArray aryId; AcDbEntity *pIte; AcDbBlockTable *pTb; AcDbBlockTableRecord *pBlockTableRecord; if(RTNORM==ads_entsel("\nSelect a object:",en,pt)); { if (Acad::eOk==acdbGetObjectId(eId,en)) { AcDbEntity *pEnt; AcDbObjectId id; if (Acad::eOk == acdbOpenObject(pEnt,eId,AcDb::kForWrite)) { ads_printf("\nExplodeName= %s",pEnt->isA()->name()); if (Acad::eOk==pEnt->explode(aryId)) { pEnt->erase(); for(int i=0;i<aryId.length();i++) { pIte=(AcDbEntity*)aryId.at(i); ads_printf("\nExplodeName= %s",pIte->isA()->name()); acdbCurDwg()->getBlockTable(pTb,AcDb::kForRead); pTb->getAt(ACDB_MODEL_SPACE, pBlockTableRecord,AcDb::kForWrite); pTb->close(); pBlockTableRecord->appendAcDbEntity(pId,pIte); pBlockTableRecord->close(); pIte->close(); }
}else { ads_printf("\nExplode failed!"); } } pEnt->close(); } }
代码对AcDbBlockReference的实体无效,总是返回failed,请问explode方法对块引用无效吗? |
|