几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(VB.NET/C#) (http://www.dimcax.com/hust/forumdisplay.php?f=176)
-   -   c# 在cad里鼠标经过一个实体时获得该实体 (http://www.dimcax.com/hust/showthread.php?t=8794)

yang686526 2009-04-19 10:33 PM

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


所有的时间均为北京时间。 现在的时间是 07:09 PM.