xwjljh 发表于 2009-6-2 23:27:00

动态获取鼠标经过点的三维坐标

<p>如果通过VB.NET来实现动态获取鼠标经过点的三维坐标呀?</p><p>谢谢</p><p></p>

雪山飞狐_lzh 发表于 2009-6-2 23:28:00

<p>Jig不行么?</p><p>你要实现什么功能,说清楚点?</p>

xinghesnak 发表于 2009-6-3 10:59:00

Up,卢版主,他的意思是实时获得CAD主窗体里光标的空间三维坐标,这个用JIG肯定能实现的,不过我想把这个功能用VB.NET做成控件(用来替代ACADX.arx的相应功能),供VB6调用,好像因为不能直接生成Com控件,不知道版主大哥有啥好的建议没有?曲线救国也行啊

雪山飞狐_lzh 发表于 2009-6-3 11:23:00

<p>老卢是ahlzl,:)</p><p><a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75796">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75796</a></p><p>这里的</p><p>七、实现Com接口</p><p>试试?</p>

xwjljh 发表于 2009-6-3 15:48:00

<p>JIG??</p><p>可否具体讲一讲呀?谢谢了</p>

雪山飞狐_lzh 发表于 2009-6-3 18:34:00

<p>先看看这里吧</p><p><a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75618">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75618</a></p><p><a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75768">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=75768</a></p>

sailorcwx 发表于 2009-6-3 21:49:00

Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Public Class Class1
    <CommandMethod("test")> Public Sub test()
      Dim Ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
      AddHandler Ed.PointMonitor, New PointMonitorEventHandler(AddressOf Getpoint)
    End Sub
    Public Sub Getpoint(ByVal sender As Object, ByVal e As PointMonitorEventArgs)
      Dim Ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
      Ed.WriteMessage(vbNewLine & e.Context.ComputedPoint.X)
      'RemoveHandler Ed.PointMonitor, AddressOf Getpoint
    End Sub
End Class

sailorcwx 发表于 2009-6-3 21:51:00

Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Public Class Class1
    <CommandMethod("test")> Public Sub test()
      Dim Ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
      AddHandler Ed.PointMonitor, New PointMonitorEventHandler(AddressOf Getpoint)
    End Sub
    Public Sub Getpoint(ByVal sender As Object, ByVal e As PointMonitorEventArgs)
      Dim Ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
      Ed.WriteMessage(vbNewLine & e.Context.RawPoint.X)
      'RemoveHandler Ed.PointMonitor, AddressOf Getpoint
    End Sub
End Class

liminnet 发表于 2009-6-3 22:05:00

hnfsf 发表于 2009-6-3 23:08:00

<p>向各位大侠学习,多多指教。。。</p>
页: [1] 2
查看完整版本: 动态获取鼠标经过点的三维坐标