vlr-xref-reactor
 
 
 

Constructs an editor reactor object that notifies of an event related to attaching or modifying XREFs

(vlr-xref-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 “XREF 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 are shown in the “XREF reactor callback data” table.

Return Values

The reactor_object argument.

XREF reactor events

Event name

Description

:VLR-beginAttach

An xref is about to be attached.

:VLR-otherAttach

An external reference is being added to the drawing database. This event occurs after objects are cloned, but before any translation. This callback function is sent just after beginDeepCloneXlation notification, but occurs only for the xref attach process.

:VLR-abortAttach

An xref attach operation was terminated before successful completion.

:VLR-endAttach

An xref attach operation completed successfully.

:VLR-redirected

An object ID in the xref drawing is being modified to point to the associated object in the drawing being referenced.

:VLR-comandeered

The object ID of the object is being appended to the symbol table of the drawing being xrefed into.

:VLR-beginRestore

An existing xref is about to be resolved (typically when a drawing with xrefs is loading).

:VLR-abortRestore

An xref unload or reload was terminated before successful completion.

:VLR-endRestore

An existing xref has been resolved (typically when a drawing with xrefs has completed loading).

:VLR-xrefSubcommandBindItem

The BIND subcommand of XREF was invoked, or a preexisting xref is being bound.

Note that the BIND subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandAttachItem

The ATTACH subcommand of XREF was invoked, or a preexisting xref is being resolved.

Note that the ATTACH subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandOverlayItem

The OVERLAY subcommand of XREF was invoked, or a preexisting xref is being resolved.

Note that the OVERLAY subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandDetachItem

The DETACH subcommand of XREF was invoked.

Note that the DETACH subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandPathItem

The PATH subcommand of XREF was invoked.

Note that the PATH subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandReloadItem

The RELOAD subcommand of XREF was invoked, or a preexisting xref is being reloaded.

Note that the RELOAD subcommand is interactive and triggers multiple events.

:VLR-xrefSubcommandUnloadItem

The UNLOAD subcommand of XREF was invoked, or a preexisting xref is being unloaded.

XREF reactor callback data

Name

List length

Parameters

:VLR-beginAttach

3

First parameter is a VLA-object pointing to the target drawing database.

Second parameter is a string containing the file name of the xref being attached.

Third parameter is a VLA-object pointing to the drawing database that contains the objects being attached.

:VLR-otherAttach

2

First parameter is a VLA-object pointing to the target drawing database.

Second parameter is a VLA-object pointing to the drawing database that contains the objects being attached.

:VLR-abortAttach

1

A VLA-object pointing to the drawing database that contains the objects being attached.

:VLR-endAttach

1

A VLA-object pointing to the target drawing database.

:VLR-redirected

2

First parameter is an integer containing the object ID for the redirected symbol table record (STR) in the drawing being referenced.

Second parameter is an integer containing the object ID for the object in the xref drawing.

:VLR-comandeered

3

First parameter is a VLA-object pointing to the database receiving the xref.

Second parameter is an integer containing the object ID of the object being commandeered.

Third parameter is a VLA-object pointing to the drawing database that contains the objects being attached.

:VLR-beginRestore

3

First parameter is a VLA-object pointing to the database receiving the xref.

Second parameter is a string containing the xref block table record (BTR) name.

Third parameter is a VLA-object pointing to the drawing database that contains the objects being attached.

:VLR-abortRestore

:VLR-endRestore

1

A VLA-object pointing to the target drawing database.

:VLR-xrefSubcommandBindItem

2

First parameter is an integer indicating the activity the BIND is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

7—Sent for an XDep block bound by XBind.

8—Sent for all other symbols: Layers, Linetypes, TextStyles, and DimStyles.

Second parameter is an integer containing the object ID of the xref being bound, or 0 if not applicable.

:VLR-xrefSubcommandAttachItem

2

First parameter is an integer indicating the activity the ATTACH is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is a string identifying the file being attached; otherwise nil if not applicable.

:VLR-xrefSubcommandOverlayItem

2

First parameter is an integer indicating the activity the OVERLAY is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is a string identifying the file being overlaid; otherwise nil if not applicable.

:VLR-xrefSubcommandDetachItem

2

First parameter is an integer indicating the activity the DETACH is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is an integer containing the object ID of the xref being detached, or 0 if not applicable.

:VLR-xrefSubcommandPathItem

3

First parameter is an integer indicating the activity the DETACH is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is an integer containing the object ID of the xref being operated on, or 0 if not applicable.

Third parameter is a string identifying the new path name of the xref; otherwise nil if not applicable.

:VLR-xrefSubcommandReloadItem

2

First parameter is an integer indicating the activity the RELOAD is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is an integer containing the object ID of the xref being reloaded, or 0 if not applicable.

:VLR-xrefSubcommandUnloadItem

2

First parameter is an integer indicating the activity the UNLOAD is carrying out. Possible values are

0—BIND subcommand invoked.

2—xref with the indicated object ID is being bound.

3—xref with the indicated object ID was successfully bound.

4—BIND subcommand completed.

5—BIND operation is about to either terminate or fail to complete on the specified object ID.

6—BIND operation has either terminated or failed to complete on the specified object ID.

Second parameter is an integer containing the object ID of the xref being unloaded, or 0 if not applicable.