查看单个帖子
旧 2009-04-29, 05:47 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】鼠标获取实体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());
}
}
请问该事件中可以获取鼠标按左右键动作不?
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)