- 积分
- 767
- 明经币
- 个
- 注册时间
- 2004-11-1
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
我得到数据字典类时,出现异常,不知道为什么,谢谢,下面是代码.
AcDbDictionary *pNamedobj; acdbHostApplicationServices()->workingDatabase() ->getNamedObjectsDictionary(pNamedobj, AcDb::kForRead);
// Get a pointer to the ASDK_DICT dictionary. // AcDbDictionary *pDict; pNamedobj->getAt("SCALE_DICT", (AcDbObject*&)pDict, AcDb::kForRead); pNamedobj->close();
// Get an iterator for the ASDK_DICT dictionary. // if (pDict == NULL) {//pDict不为空 ASSERT(0); return; } AcDbDictionaryIterator* pDictIter= pDict->newIterator();//在这句后出现异常 BSCScaleClass *pMyCl; for (; !pDictIter->done(); pDictIter->next()) {
// Get the current record, open it for read, and // print its data. // pDictIter->getObject((AcDbObject*&)pMyCl, AcDb::kForRead); pMyCl->gethScale(hs); pMyCl->getvScale(vs); pMyCl->close(); acutPrintf("\nintval is: %d", hs); } delete pDictIter; pDict->close(); |
|