几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】鼠标获取实体id - 精华帖集合 (http://www.dimcax.com/hust/showthread.php?t=14181)

yang686526 2009-04-29 05:47 PM

【转帖】鼠标获取实体id - 精华帖集合
 
鼠标获取实体id - 精华帖集合
www.dimcax.com
鼠标获取实体id
, ,
利用edtior 的 pointmonitor事件,当鼠标滑过显示对象的objectid
对于这个问题,感到很迷惑,有没有达人可以提供下参考代码
已经实现了,顺便把代码贴出来,供像我这样的新手学习;
办公电脑上不了网。代码是自己敲的,如果有错误,望大家修改;
[commandmethod("mousegetid")]
static public void mousegetid()
{
//获取编辑器
editor ed = application.documentmanager.mdiactivedocument.editor;
//获取点的监视事件
ed.pointmonitor += new pointmonitoreventhandler(ed_pointmonitor);
}
static void ed_pointmonitor(object sender,pointmonitoreventargs e)
{
//拾取当前实体对象提交
fullsubentitypath[] fsp = e.context.getpickedentities();
if(fsp.length>0)
{
// 显示实体id
e.appendtolltiptext(fsp[0].getobjectids()[0].tostring());
}
}
请问该事件中可以获取鼠标按左右键动作不?


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