Hi everyone,
Following event is found in autocad help, works fine, until you change layout.
Then it is not triggered anymore.
has anyone this problem,
or you know how I can solve this?
Please let me know!
I'm using Autocad 2011.
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Public Class Useri1Event
<CommandMethod("AddAppEvent")> Public Sub AddAppEvent()
AddHandler Application.SystemVariableChanged, AddressOf appSysVarChanged
End Sub
<CommandMethod("RemoveAppEvent")> Public Sub RemoveAppEvent()
RemoveHandler Application.SystemVariableChanged, AddressOf appSysVarChanged
End Sub
Public Sub appSysVarChanged(ByVal senderObj As Object, ByVal sysVarChEvtArgs As Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs)
Dim oVal As Object = Application.GetSystemVariable(sysVarChEvtArgs.Name)
'' Display a message box with the system variable name and the new value
Application.ShowAlertDialog(sysVarChEvtArgs.Name & " was changed." & vbLf & "New value: " & oVal.ToString())
'End If
End Sub
End Class