|
[code]在下文中一共展示了AcDbBlockTableRecord::isFromExternalReference方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的C++代碼示例。
示例1: if
▲ 點讚 9 ▼
Acad::ErrorStatus
ArxDbgUtils::collectBlockIds(SdStrObjIdList& list, bool excludeMsPs,
bool excludeXref, bool excludeAnonymous, AcDbDatabase* db)
{
ASSERT(db != NULL);
Acad::ErrorStatus retCode = Acad::eInvalidInput;
AcDbBlockTable* blkTbl;
Acad::ErrorStatus es = db->getSymbolTable(blkTbl, AcDb::kForRead);
if (es == Acad::eOk) {
// get an iterator over this symbol Table
AcDbBlockTableIterator* tblIter;
es = blkTbl->newIterator(tblIter);
ASSERT(tblIter != NULL);
if (es == Acad::eOk) {
// walk table and just collect all the objIds
// of the entries
AcDbObjectId tblRecId;
for (; !tblIter->done(); tblIter->step()) {
AcDbBlockTableRecord* blkRec;
es = tblIter->getRecord(blkRec, AcDb::kForRead);
if (es == Acad::eOk) {
if (excludeMsPs && blkRec->isLayout()) {
; // do nothing
}
else if ((excludeXref) &&
((blkRec->isFromExternalReference()) ||
(blkRec->isFromOverlayReference()))) {
; // do nothing
}
else if (excludeAnonymous && blkRec->isAnonymous()) {
; // do nothing
}
else {
const TCHAR* name;
blkRec->getName(name);
list.AddAlpha(name, blkRec->objectId());
}
blkRec->close();
}
}
delete tblIter;
retCode = Acad::eOk;
}
blkTbl->close();
}
return retCode;
}[/code] |
|