代码如下:
AcDbDatabase *pCurDb = NULL;
pCurDb = acdbHostApplicationServices()->workingDatabase();
pCurDb->getLayerTable(pLyrTable, AcDb::kForWrite); // Check to see if the layer name exists // Note how we can change the open mode // of the layer table from AcDb::kForRead // to AcDb::kForWrite
// pLyrTable->upgradeOpen(); pLyrTblRecord = new AcDbLayerTableRecord;
pLyrTblRecord->setName("answer"); pLyrTblRecord->setColor(color); pLyrTblRecord->setLinetypeObjectId(ltypeId);
pLyrTable->add(pLyrTblRecord);
}
当执行到 pLyrTable->add(pLyrTblRecord);时, cad中总是出现未处理异常。。。(Access Violation Reading 0xcccccccc),地址5EF287CH。麻烦各位大侠帮忙解决一下
QQ:371637932 |