www.mxdraw.com
|
块表中的属性定义对象
class McDbAttributeDefinition : public McDbText;
McDbAttributeDefinition.h
例如:遍历块表记录的属性定义对象
AcDbObjectPointer<AcDbBlockTableRecord> spBlkRec(blkRecId,McDb::kForRead); if(spBlkRec.openStatus() == Acad::eOk) { McDbBlockTableRecordIterator* pIterator = NULL; spBlkRec->newIterator(pIterator); if(pIterator != NULL) { std::auto_ptr<McDbBlockTableRecordIterator> spIterator(pIterator); for(;!pIterator->done();pIterator->step()) { AcDbObjectId entId; pIterator->getEntityId(entId); AcDbObjectPointer<McDbAttributeDefinition> spAttribDef(entId,AcDb::kForRead); if(spAttribDef.openStatus() != Acad::eOk) { continue; } if(spAttribDef->isInvisible() ) { continue; } // 找到一个属性定义 } } }