李毛毛 发表于 2011-1-12 09:10:27

pointMonitor


//开启动态查询

public void PointMonitor()
{
Editor ed = Tools.Editor;
ed.PointMonitor += new PointMonitorEventHandler(ed_PointMonitor);
}

//关闭动态查询
public void PointMonitorQiut()
{
Editor ed = Tools.Editor;
ed.PointMonitor -= new PointMonitorEventHandler(ed_PointMonitor);
}

void ed_PointMonitor(object sender, PointMonitorEventArgs e)
{
FullSubentityPath[] epaths = e.Context.GetPickedEntities();
if (epaths.Length > 0)
{
FullSubentityPath epath = epaths;
Entity ent = Tools.GetEntity(epath.GetObjectIds());
ResultBuffer rb = Tools.GetXData(ent);                 if (rb != null)
{
TypedValue[] tv = rb.AsArray();
string str;                  
string pl_num1 = tv.Value.ToString().Split(',');
str =pl_num1;
e.AppendToolTipText(str);                }            }      }    为什么epaths的length是0呢?

mmaoqr 发表于 2011-1-12 12:30:39

很强啊!!!!!!!!!!!!!

李毛毛 发表于 2011-1-12 14:49:16

回复 mmaoqr 的帖子

可是我获取不到实体啊!!

雪山飞狐_lzh 发表于 2011-1-12 15:15:18

http://bbs.mjtd.com/thread-76131-1-1.html

chpmould 发表于 2011-1-12 23:09:44

未看懂....
页: [1]
查看完整版本: pointMonitor