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
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |