Hi,
You should try the Application.SystemVariableChanged event.
Ouch. I've probably spent 10 years of my spare time trying to put my app together, and have no idea what you mean by:
You should try the Application.SystemVariableChanged event.
How do I implement that?
Exactly the same as any other event handling, you add an handler to the event.
Application.SystemVariableChanged += Application_SystemVariableChanged;
and, for example:
private void Application_SystemVariableChanged
(object sender, Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs e)
{
if (e.Name == "CLAYER" && e.Changed)
Application.ShowAlertDialog("Current layer changed")
}
Gile,
Thanks again,
Wasn't that used to application events but saw I had an OnIdle one.
And the & e.changed in your example is also helpful.