I am trying to make the status bar in AutoCAD show the name of the active document. For example, if I have a file whose fullname is something like "C:/MyFiles/AutoCAD Files/Drawing123.dwg", I want the status bar to show "Drawing123.dwg". I have managed to make that happen. However, I also need for this to update when I open another file (such as DrawingABC.dwg). Is there a way I can make the status bar update every time the active document is changed? Right now, if I start with Drawing123 open, and then open or switch to DrawingABC, the status bar still displays "Drawing123".
Here's what I've got so far...
-------------------------------------------------------------------
Public Function StatusChg()
nameshort = Application.ActiveDocument.Name
ThisDrawing.SetVariable "MODEMACRO", nameshort
End Function
-------------------------------------------------------------------
Basically, I just need to figure out how to call the StatusChg function whenever the ActiveDocument is changed.
Thanks in advance.