版主 在不在啊!帮忙解决个问题啊。我要得到到DWG中所有块名啊
版主 在不在啊!帮忙解决个问题啊。我要得到到DWG中所有块名啊!谢谢
回复
// ----- ss._test command (do not rename)<BR>static void ss_test(void)<BR>{<BR> // Add your code for command ss._test here<BR> AcDbBlockTable* pBlockTable;<BR> acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable, AcDb::kForRead);<BR> char *strName;<BR> AcDbObjectId objId;<BR> AcDbBlockTableIterator* iter;<BR> if (pBlockTable->newIterator(iter) == Acad::eOk) {<BR> for(;!iter->done();iter->step()) {<BR> AcDbBlockTableRecord* pBlkTblRec;<BR> if (iter->getRecord(pBlkTblRec, AcDb::kForRead) == Acad::eOk) {<BR> pBlkTblRec->getName(strName);<BR> if (stricmp("*MODEL_SPACE",strName) !=0 &&<BR> stricmp("*PAPER_SPACE",strName) != 0 &&<BR> stricmp("*PAPER_SPACE0",strName) != 0)<BR> {<BR> acedAlert(strName);<BR> }<BR> pBlkTblRec->close();<BR> }<BR> }<BR> }<BR> pBlockTable->close();<BR>} 谢谢斑竹,我先试试
页:
[1]