Guidelines for Event Handlers
Use Events
Enable Application Level Events
Handle Application Level Events
Application level events are not persistent in AutoCAD VBA.
That is, they are not automatically enabled when a VBA project is
loaded. Application level events must therefore be enabled for VBA
and all other ActiveX® Automation controllers.
Once the application level
events are enabled, you have a wide range of events available to
you. These events include:
-
AppActivate
-
Triggered
just before the main Application window is activated.
-
AppDeactivate
-
Triggered
just before the main Application window is deactivated.
-
ARXLoaded
-
Triggered
when an ObjectARX application has been loaded.
-
ARXUnloaded
-
Triggered
when an ObjectARX application has been unloaded.
-
BeginCommand
-
Triggered
immediately after a command is issued, but before it completes.
-
BeginFileDrop
-
Triggered
when a file is dropped on the main Application window.
-
BeginLISP
-
Triggered
immediately after AutoCAD receives a request to evaluate a LISP expression.
-
BeginModal
-
Triggered
just before a modal dialog box is displayed.
-
BeginOpen
-
Triggered
immediately after AutoCAD receives a request to open an existing drawing.
-
BeginPlot
-
Triggered
immediately after AutoCAD receives a request to print a drawing.
-
BeginQuit
-
Triggered
just before an AutoCAD session ends.
-
BeginSave
-
Triggered
immediately after AutoCAD receives a request to save the drawing.
-
EndCommand
-
Triggered
immediately after a command completes.
-
EndLISP
-
Triggered
upon completion of evaluating a LISP expression.
-
EndModal
-
Triggered
just after a modal dialog box is dismissed.
-
EndOpen
-
Triggered
immediately after AutoCAD finishes opening an existing drawing.
-
EndPlot
-
Triggered
after a document has been sent to the printer.
-
EndSave
-
Triggered
when AutoCAD has finished saving the drawing.
-
LISPCancelled
-
Triggered
when the evaluation of a LISP expression is canceled.
-
NewDrawing
-
Triggered
just before a new drawing is created.
-
SysVarChanged
-
Triggered
when the value of a system variable is changed.
-
WindowChanged
-
Triggered
when there is a change to the Application window.
-
WindowMovedOrResized
-
Triggered just after the Application window has
been moved or resized.