There are many types of AutoCAD reactors; each reactor type responds to one or more AutoCAD events.
The different types of available reactors are grouped into the following categories:
Database reactors notify your application when specific events occur to the drawing database, such as when an object has been added to the database.
Document reactors notify your application of a change to the current drawing document, such as opening a new drawing document, activating a different document window, and changing a document's lock status.
Editor reactors notify you each time an AutoCAD command is invoked; a drawing opens, closes, or is saved; a DXF file is imported or exported; or a system variable value is changed.
Linker reactors notify your application every time an ObjectARX application is loaded or unloaded.
Object reactors notify you each time a specific object is modified, copied, or deleted.
With the exception of Editor reactors, there is one type of reactor for each reactor category. The following table lists the name by which each reactor type is identified in AutoLISP code:
General reactor types |
|
---|---|
Reactor type identifier |
Description |
:VLR-AcDb-Reactor |
Database reactor |
:VLR-DocManager-Reactor |
Document management reactor |
:VLR-Editor-Reactor |
General editor reactor—maintained for backward-compatibility |
:VLR-Linker-Reactor |
Linker reactor |
:VLR-Object-Reactor |
Object reactor |
Beginning with AutoCAD 2000, the broad class of Editor reactors was broken down into more specific reactor types. The :VLR-Editor-Reactor type is retained for backward-compatibility, but any new Editor reactors introduced with AutoCAD 2000 cannot be referenced through :VLR-Editor-Reactor. The following table lists the types of Editor reactors available beginning with AutoCAD 2000.
Editor reactor types |
|
---|---|
Reactor type |
Description |
:VLR-Command-Reactor |
Provides notification of a command event |
:VLR-DeepClone-Reactor |
Provides notification of a deep clone event |
:VLR-DWG-Reactor |
Provides notification of a drawing event (for example, opening or closing a drawing file) |
:VLR-DXF-Reactor |
Provides notification of an event related to reading or writing a DXF file |
:VLR-Insert-Reactor |
Provides notification of an event related to block insertion |
:VLR-Lisp-Reactor |
Provides notification of an AutoLISP event |
:VLR-Miscellaneous-Reactor |
Does not fall under any of the other editor reactor types |
:VLR-Mouse-Reactor |
Provides notification of a mouse event (for example, a double-click) |
:VLR-SysVar-Reactor |
Provides notification of a change to a system variable |
:VLR-Toolbar-Reactor |
Provides notification of a change to the bitmaps in a toolbar |
:VLR-Undo-Reactor |
Provides notification of an undo event |
:VLR-Wblock-Reactor |
Provides notification of an event related to writing a block |
:VLR-Window-Reactor |
Provides notification of an event related to moving or sizing the AutoCAD application window |
:VLR-XREF-Reactor |
Provides notification of an event related to attaching or modifying xrefs |
Use the vlr-types function to return a complete list of available reactor types. For example:
(vlr-types) (:VLR-Linker-Reactor :VLR-Editor-Reactor :VLR-AcDb-Reactor :VLR-DocManager-Reactor :VLR-Command-Reactor :VLR-Lisp-Reactor :VLR-DXF-Reactor :VLR-DWG-Reactor :VLR-Insert-Reactor :VLR-Wblock-Reactor :VLR-SysVar-Reactor :VLR-DeepClone-Reactor :VLR-XREF-Reactor :VLR-Undo-Reactor :VLR-Window-Reactor :VLR-Toolbar-Reactor :VLR-Mouse-Reactor :VLR-Miscellaneous-Reactor :VLR-Object-Reactor)