查看单个帖子
旧 2009-04-19, 10:33 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 c# 在cad里鼠标经过一个实体时获得该实体

c# 在cad里鼠标经过一个实体时获得该实体
www.dimcax.com
c# 在cad里鼠标经过一个实体时获得该实体
应该用什么事件来解决这个问题?才鸟大哥?
可以用editor的一个事件来取得: application.documentmanager.mdiactivedocument.editor.pointfilter += new pointfiltereventhandler(editor_pointfilter); static void editor_pointfilter(object sender, pointfiltereventargs e) { autodesk.autocad.editorinput.inputpointcontext context = e.context; fullsubentitypath[] path = context.getpickedentities(); if (path.length == 0) return; try { foreach (fullsubentitypath objpath in path) { objectid[] ids = objpath.getobjectids(); foreach (objectid objid in ids) { ..... } } } catch(system.exception exp) { displaystatus(exp.message); } }
搞定,感谢tommy
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)