Hi Everybody,
Is there anyway to detect layout name <CTAB system variable> changed ?
(in case user rename layout; Not switch to other layout)
Event SystemVariableChangedEventHandler below not fired CTAB sysvar>
Thank you in advance.
[CommandMethod("SysVariableChange")]
public void SysVarChangedmonitor()
{
AcadApp.SystemVariableChanged += new Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventHandler(SysVariableChange);
}
void SysVariableChange(object sender, Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs e)
{
try
{
object oVal = AcadApp.GetSystemVariable(e.Name);
AcadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\n" + e.Name + " was changed." + "\tNew value: " + oVal.ToString());
}
catch (Autodesk.AutoCAD.Runtime.Exception ex)
{
AcadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nSysVarChanged: " + e.Name + " - " + ex.Message + "\n");
}
}