ds_name entname; AcDbObjectId entID; AcDbEntity *pEnt=NULL; _variant_t vvhandle; _bstr_t bstrSql; CString s1,s2,s3; vvhandle=143;//一条线段的句柄 s1 = (LPCTSTR)(_bstr_t)vvhandle; acdbHandEnt(s1,entname); acdbGetObjectId(entID,entname);
acdbOpenObject(pEnt,entID,AcDb::kForWrite,true); pEnt->highlight(); pEnt->close(); AfxMessageBox("结束高亮显示,点击确定"); 一运行这段,AutoCAD就会异常关闭!帮忙指导一下吧,多谢阿! |