我想用迭代器历遍整个图层。。。然后想用名字判断自己想要的那个图层。。。把它提出来。。。 我不懂怎么判断。。。源码附上 大家帮帮 AcDbLayerTable *pLayerTbl; acdbHostApplicationServices()->workingDatabase() ->getSymbolTable(pLayerTbl, AcDb::kForWrite); AcDbLayerTableIterator *iter; pLayerTbl->newIterator(iter); AcDbLayerTableRecord *ltr; char *ltrname; // char *ltrnam; char *a="ASDK_TESTLAYER"; for(iter->start();!iter->done();iter->step()) { iter->getRecord(ltr,AcDb::kForRead); ltr->getName(ltrname); // ltrnam=ltrname; if(a =ltrname) { acutPrintf("\n我成功了%s ",ltrname); a=ltrname; acutPrintf("图层不存在 "); ltr->close(); free(ltrname); } else { acutPrintf("图层不存在 "); } } delete iter; pLayerTbl->close(); |