suda007 发表于 2005-12-11 19:37:00

Help--请教各位高手

代码如下:
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

王咣生 发表于 2005-12-11 23:04:00

pLyrTable还没有关闭

suda007 发表于 2005-12-12 10:59:00

不好意思,已经关闭了,只是没有传上来,谢谢
页: [1]
查看完整版本: Help--请教各位高手