高手帮忙指点下程序,
<p>ds_name entname;<br/> AcDbObjectId entID;<br/> AcDbEntity *pEnt=NULL;<br/> _variant_t vvhandle;<br/> _bstr_t bstrSql;<br/> CString s1,s2,s3;</p><p>vvhandle=143;//一条线段的句柄<br/> s1 = (LPCTSTR)(_bstr_t)vvhandle;<br/> acdbHandEnt(s1,entname);<br/> acdbGetObjectId(entID,entname);<br/><br/> acdbOpenObject(pEnt,entID,AcDb::kForWrite,true);<br/> <br/> pEnt->highlight();<br/> pEnt->close();<br/> AfxMessageBox("结束高亮显示,点击确定");</p><p>一运行这段,autocad就会异常关闭!帮忙指导一下吧,多谢阿!</p> <p>ads_name CString</p><p>acdbHandEnt函数使用的参数的数据类型是ads_name而不是CString</p>
页:
[1]