TA的每日心情 | 开心 昨天 06:36 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
管理员
- 积分
- 1308
|
- /////////////////////////////////////////////////////
- // get invisible entities
- /////////////////////////////////////////////////////
- Acad::ErrorStatus
- getInvisible(const char *blkName, AcDbObjectIdArray& ents)
- {
- AcDbBlockTable *pBT = NULL;
- Acad::ErrorStatus es;
- if (Acad::eOk != (es=acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBT, AcDb::kForRead)))
- return es;
- AcDbBlockTableRecord *pBTR = NULL;
- if ( Acad::eOk != (es=pBT->getAt(blkName, pBTR, AcDb::kForRead))) {
- pBT->close();
- return es;
- }
- pBT->close();
-
- AcDbBlockTableRecordIterator *pBTRIter = NULL;
- AcDbEntity *pEnt = NULL;
- for(pBTR->newIterator( pBTRIter ); !pBTRIter->done(); pBTRIter->step()) {
- pBTRIter->getEntity( pEnt, AcDb::kForRead );
-
- if (NULL != pEnt) {
- if (AcDb::kInvisible == pEnt->visibility())
- ents.append( pEnt->objectId() );
- pEnt->close();
- pEnt = NULL;
- }
- }
- delete pBTRIter;
- pBTR->close();
- return Acad::eOk;
- }
复制代码 |
|