vlr-acdb-reactor
 
 
 

Constructs a reactor object that notifies when an object is added to, modified in, or erased from a drawing database

The vlr-acdb-reactor function constructs a database reactor object.

(vlr-acdb-reactor data callbacks)

Arguments

data

Any AutoLISP data to be associated with a reactor object; otherwise nil, if no data.

callbacks

A list of pairs of the following form:

(event-name . callback_function)

where event-name is one of the symbols listed in the “Database reactor events” table below, and callback_function is a symbol representing a function to be called when the event fires. Each callback function accepts two arguments:

reactor_object The VLR object that called the callback function

obj The database object (AutoLISP entity) associated with the event

Database reactor events

Name

Event

:vlr-objectAppended

An object has been appended to the drawing database.

:vlr-objectUnAppended

An object has been detached from the drawing database, e.g., by using UNDO.

:vlr-objectReAppended

A detached object has been restored in the drawing database, e.g., by using REDO.

:vlr-objectOpenedForModify

An object is about to be changed.

:vlr-objectModified

An object has been changed.

:vlr-objectErased

An object has been flagged as being erased.

:vlr-objectUnErased

An object's erased-flag has been removed.