About Attaching Reactors to Drawings (AutoLISP/ActiveX)

A reactor is an object you attach to drawing objects to have AutoCAD notify your application when events you are interested in occur.

Note: ActiveX support in AutoLISP is limited to Windows only.

For example, if an entity is moved that your application has attached a reactor to, your application will receive notification that the entity has moved. If you design it to do so, your application can react to this notification with appropriate actions, such as moving other entities associated with the one moved, or perhaps updating a text tag that records revision information on the altered drawing feature.

A reactor communicates with your application by calling a function you have associated with the reactor. Such a function is referred to as a callback function. There is nothing particularly unusual about reactor callback functions—they are like other AutoLISP functions. Before you can use reactor, you must load the AutoLISP extension functions that allow you to create them. Issue the following function call to load reactor support:

vl-load-com

All applications that use reactors—including all callback functions—should begin by calling vl-load-com.

Note: In some cases, the vlr-sysVarWillChange and vlr-sysVarChanged notifications are triggered multiple times for one system variable change.