helloyou88 发表于 2006-11-23 18:53:00

请教erase(false)

<P>请教个问题:</P>
<P>在图中我delete一条线,我打算在反映器Objecterased内恢复这条线段。总是有问题,哪位高手帮忙解决解决?</P>
<P>(1)下面代码返回:eNotOpenForWrite</P>
<P>&nbsp;AcDbObject *dbObj1=(AcDbObject *)dbObj;</P>
<P>ret=dbObj1-&gt;erase(Adesk::kFalse);</P>
<P>(2)下面代码不抱错,但却没恢复</P>
<P>objId = dbObj1-&gt;ownerId();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret=acdbOpenObject(dbObj1,objId,AcDb::kForWrite,Adesk::kTrue);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret=dbObj1-&gt;erase(Adesk::kFalse); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dbObj1-&gt;close();</P>
页: [1]
查看完整版本: 请教erase(false)