List of all saved custom entities
Hi,
I have created and saved custom entities to dwg database. Here may be many custom entities of this type. How can I find IDs of all them?
0
Comments
-
My code.
AcDbDatabase* pDb = nullptr; AcDbBlockTable* pBlockTable = nullptr; AcDbBlockTableRecord* pBlockTableRecord = nullptr; AcDbBlockTableRecordIterator* pIter = nullptr; AcDbEntity* pEntity = nullptr; AcDbObjectId id; std::vector<AcDbObjectId> ids; pDb = acdbHostApplicationServices()->workingDatabase(); pDb->getSymbolTable(pBlockTable, AcDb::kForRead); pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite); pBlockTable->close(); pBlockTableRecord->newIterator(pIter); do { if (pIter->getEntity(pEntity, AcDb::kForRead) == Acad::eOk) { if (pEntity->isKindOf(TINSurface::desc())) { ids.push_back(pEntity->id()); } } pIter->step(); } while (!pIter->done()); pBlockTableRecord->close();
0
This discussion has been closed.