|
//获取所有的块参照
Acad::ErrorStatus GetAllBREF(AcDbObjectIdArray& ids)
{
AcDbDatabase* pDb=acdbHostApplicationServices()->workingDatabase();
if(pDb==NULL)
{
return Acad::eNullPtr;
}
//打开块表
AcDbBlockTablePointer spRec(pDb->blockTableId(),AcDb::kForRead);
if(spRec.openStatus()!=Acad::eOk)
{
return spRec.openStatus();
}
AcDbBlockTableIterator* pIterator=NULL;
//新建遍历器
Acad::ErrorStatus es=spRec->newIterator(pIterator);
if(es!=Acad::eOk)
{
return es;
} |
|