vlr-insert-reactor
 
 
 

Constructs an editor reactor object that notifies of an event related to block insertion

(vlr-insert-reactor data callbacks)

Arguments

data

Any AutoLISP data to be associated with the 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 “Insert 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.

list A list of extra data elements associated with the particular event. The contents of this list for particular events is shown in the “Insert reactor callback data” table.

Return Values

The reactor_object argument.

Insert reactor events

Event name

Description

:vlr-beginInsert

A block is about to be inserted into the drawing database.

:vlr-beginInsertM

A 3D transformation matrix is about to be inserted into the drawing database.

:vlr-otherInsert

A block or matrix has been added to the drawing database. This notification is sent after the insert process completes copying the object into the database, but before ID translation or entity transformation occurs.

:vlr-endInsert

Usually indicates an insert operation on the drawing database is complete. However, in some cases, the transform has not yet happened, or the block that was created has not yet been appended. This means the objects copied are not yet graphical, and you cannot use them in selection sets until the :vlr-commandEnded notification is received.

:vlr-abortInsert

Insert operation was terminated and did not complete, leaving the database in an unstable state.

Insert reactor callback data

Name

List length

Parameters

:vlr-beginInsert

3

First parameter is a VLA-object pointing to the database in which the block is being inserted.

Second parameter is a string naming the block to be inserted.

Third parameter is a VLA-object identifying the source database of the block.

:vlr-beginInsertM

3

First parameter is a VLA-object pointing to the database in which the 3D transformation matrix is being inserted.

Second parameter is the 3D transformation matrix to be inserted.

Third parameter is a VLA-object identifying the source database of the matrix.

:vlr-otherInsert

2

First parameter is a VLA-object pointing to the database in which the block or matrix is being inserted.

Second parameter is a VLA-object identifying the source database of the block or matrix.

:vlr-endInsert

:vlr-abortInsert

1

VLA-object pointing to target database.