动态获取鼠标经过点的三维坐标
<p>如果通过VB.NET来实现动态获取鼠标经过点的三维坐标呀?</p><p>谢谢</p><p></p> <p>Jig不行么?</p><p>你要实现什么功能,说清楚点?</p> Up,卢版主,他的意思是实时获得CAD主窗体里光标的空间三维坐标,这个用JIG肯定能实现的,不过我想把这个功能用VB.NET做成控件(用来替代ACADX.arx的相应功能),供VB6调用,好像因为不能直接生成Com控件,不知道版主大哥有啥好的建议没有?曲线救国也行啊 <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> <p>JIG??</p><p>可否具体讲一讲呀?谢谢了</p> <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> Imports Autodesk.AutoCAD.EditorInputImports 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
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
<p>向各位大侠学习,多多指教。。。</p>
页:
[1]
2