I know scripts can be set up to run when you open a drawing, I do it all the time. Is there a way to set up a script to run automatically when you close a drawing?
|
I know scripts can be set up to run when you open a drawing, I do it all the time. Is there a way to set up a script to run automatically when you close a drawing?
You could undefine the CLOSE command, and then redefine it with code of your choosing, which, at the end, would call the ._CLOSE command. The initial period tells AutoCAD to run the as-originally-defined-in-the-program version of CLOSE, rather than your redefined version. I have never done that, so you may want to test it out to make certain that all of the various ways of closing a drawing actually invoke the CLOSE command.