Understanding Reactor Types and Events
 
 
 

There are many types of AutoCAD reactors. Each reactor type responds to one or more AutoCAD events. The different types of reactors are grouped into the following categories:

Database Reactors

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

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

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 changes value.

Linker Reactors

Linker reactors notify your application every time an ObjectARX application is loaded or unloaded.

Object Reactors

Object reactors notify you each time a specific object is changed, 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 is 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 of 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 an AutoCAD window

:VLR-XREF-Reactor

Provides notification of an event related to attaching or modifying xrefs

Use the vlr-types function to return the complete list of reactor types.