Macro that runs automatically when I close a file

Macro that runs automatically when I close a file

Anonymous
Not applicable
728 Views
1 Reply
Message 1 of 2

Macro that runs automatically when I close a file

Anonymous
Not applicable

Hello,

 

I want to prepare a macro that runs automatically when I close a file. Is this possible?

 

Thank you for your answers

0 Likes
Accepted solutions (1)
729 Views
1 Reply
Reply (1)
Message 2 of 2

Kent1Cooper
Consultant
Consultant
Accepted solution

@Anonymous wrote:

....

I want to prepare a macro that runs automatically when I close a file. Is this possible?

 

Thank you for your answers


Probably not with a command macro.  If you are using a full AutoCAD program [not LT], it should not be difficult to make a new definition of the CLOSE command, including Undefining the original.  The new version could do whatever you want before calling for a native Close command at the end.

 

But I think this kind of thing has come up before [I'll let you Search], and a difficulty may be that you would need to always do it using the new command definition -- it may not work when you use the X-at-upper-right way of Closing.

Kent Cooper, AIA