Imports Autodesk.AutoCAD.Interop
Public Class Class1
<Autodesk.AutoCAD.Runtime.CommandMethod("Test")> _
Public Sub AddHandlerBeginCommand()
AddHandler Application.DocumentManager.MdiActiveDocument.CommandWillStart, AddressOf CommandWillStart
End Sub
Public Sub CommandWillStart(ByVal sender As Object, ByVal e As Autodesk.AutoCAD.ApplicationServices.CommandEventArgs)
Dim acDoc As Autodesk.AutoCAD.ApplicationServices.Document = Application.DocumentManager.MdiActiveDocument
acDoc.Editor.WriteMessage(vbCrLf + "你将执行命令 " & e.GlobalCommandName + vbCrLf)
End Sub
End Class
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |