www.mxdraw.com
|
打碎块
virtual Mcad::ErrorStatus explode(McDbVoidPtrArray& entitySet) const;
参数 |
说明 |
McDbVoidPtrArray& entitySet |
打碎后新生成的实体 |
如果成功返回Mcad::eOk,如果传递的数据非法则返回Mcad::eInvalidInput
例如:打碎图块代码
void ExplodeBlockReference() { ads_name entName; ads_point pt; if(acedEntSel(_T("打碎的块引用:"),entName,pt) != RTNORM) { return; } AcDbObjectId objId; if(acdbGetObjectId(objId,entName) != Acad::eOk) return; McDbObjectPointer<McDbBlockReference> spBlkRef(objId,AcDb::kForWrite); if(spBlkRef.openStatus() != Acad::eOk) return; McDbVoidPtrArray entitySet; if(spBlkRef->explode(entitySet) != Mcad::eOk) return; for(int i = 0; i < entitySet.length();i++) { McDbEntity* pEnt = (McDbEntity*)entitySet[i]; MrxDbgUtils::addToCurrentSpaceAndClose(pEnt); } spBlkRef->erase(); }