vlr-dwg-reactor
 
 
 

Constructs an editor reactor object that notifies of a drawing event (for example, opening or closing a drawing file)

(vlr-dwg-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 “DWG reactor events” table below, and callback_function is a symbol representing a function to be called when the event occurs. 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 are shown in the “DWG reactor callback data” table.

Return Values

The reactor_object argument.

DWG reactor events

Event name

Description

:vlr-beginClose

The drawing database is to be closed.

:vlr-databaseConstructed

A drawing database has been constructed.

:vlr-databaseToBeDestroyed

The contents of the drawing database are about to be deleted from memory.

vlr-beginDwgOpen

AutoCAD is about to open a drawing file.

:vlr-endDwgOpen

AutoCAD has ended the open operation.

:vlr-dwgFileOpened

A new drawing has been loaded into the AutoCAD window.

vlr-beginSave

AutoCAD is about to save the drawing file.

vlr-saveComplete

AutoCAD has saved the current drawing to disk.

DWG reactor callback data

Name

List length

Parameters

:vlr-beginClose

:vlr-databaseConstructed

:vlr-databaseToBeDestroyed

0

 

:vlr-beginDwgOpen

:vlr-endDwgOpen

:vlr-dwgFileOpened

1

A string identifying the file to open.

:vlr-beginSave

1

A string containing the default file name for save; may be changed by the user.

:vlr-saveComplete

1

A string containing the actual file name used for the save.