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

Help--请教各位高手

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

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

pLyrTable还没有关闭

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

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