<CommandMethod("VariableChanged")> _
Public Sub VariableChanged()
AddHandler Application.SystemVariableChanged, New Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventHandler(AddressOf SystemVariableChanged)
End Sub
Private Sub SystemVariableChanged(ByVal sender As Object, ByVal e As Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs)
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
doc.Editor.WriteMessage("变量名称: {0}" & vbLf, e.Name)
If e.Name = "WSCURRENT" Then
‘’
End If
End Sub