- 积分
- 316
- 明经币
- 个
- 注册时间
- 2004-10-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-1-15 00:22:00
|
显示全部楼层
Acad::ErrorStatus es;
AcDbBlockTable *pBlkTbl;
es=CurrectWorkingDWG->getBlockTable(pBlkTbl, AcDb::kForRead);
if (es!=Acad::eOk) {return;}
AcDbBlockTableRecord *pBlkTblRcd; es = pBlkTbl->getAt(ACDB_MODEL_SPACE,pBlkTblRcd,AcDb::kForRead); pBlkTbl->close(); if (es!=Acad::eOk) {return;}
AcDbBlockTableRecordIterator *pBlkTblRcdItr; es=pBlkTblRcd->newIterator(pBlkTblRcdItr); if (es!=Acad::eOk) {pBlkTblRcd->close();return;}
AcDbEntity *pEnt; for (pBlkTblRcdItr->start();!pBlkTblRcdItr->done();pBlkTblRcdItr->step()) { pBlkTblRcdItr->getEntity(pEnt,AcDb::kForRead); //........... pEnt->close(); } pBlkTblRcd->close(); delete pBlkTblRcdItr;
看似麻烦,实际上比acedSSGet快且有效 |
|