- 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
|