AutoCAD 2012 帮助
 
vlr-docmanager-reactor
 
 
 

Constructs a reactor object that notifies of events relating to drawing documents

(vlr-docmanager-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 “DocManager 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 “DocManager reactor callback data” table.

Return Values

The reactor_object argument.

DocManager reactor events

Event name

Description

:vlr-documentCreated

A new document was created for a drawing (new or open).

Useful for updating your per-document structures.

:vlr-documentToBeDestroyed

A document will be destroyed.

:vlr-documentLockModeWillChange

A command is about to start or finish modifying elements in the document, and is obtaining or releasing a lock on the document.

:vlr-documentLockModeChangeVetoed

A reactor invoked veto on itself from a :vlr-documentLockModeChanged callback.

:vlr-documentLockModeChanged

The lock on the document has been obtained or released.

:vlr-documentBecameCurrent

The current document has been changed.

This does not necessarily imply that the document has been activated, because changing the current document is necessary for some operations. To obtain user input, the document must be activated as well.

:vlr-documentToBeActivated

A currently inactive document has just received the activate signal, implying that it is about to become the current document.

:vlr-documentToBeDeactivated

Another window (inside or outside of AutoCAD) has been activated.

DocManager reactor callback data

Name

List length

Parameters

:vlr-documentCreated

:vlr-documentToBeDestroyed

:vlr-documentBecameCurrent

:vlr-documentToBeActivated

:vlr-documentToBeDeactivated

1

The affected document object (VLA-object).

:vlr-documentLockModeChangeVetoed

2

First parameter is the affected document object (VLA-object).

Second parameter is the global command string passed in for the lock request. If the callback is being made on behalf of an unlock request, the string will be prefixed with “#”.

:vlr-documentLockModeWillChange

:vlr-documentLockModeChanged

5

First parameter is the affected document object (VLA-object).

Second parameter is an integer indicating the lock currently in effect for the document object.

Third parameter is an integer indicating the lock mode that will be in effect after the lock is applied.

Fourth parameter is the strongest lock mode from all other execution contexts.

Fifth parameter is the global command string passed in for the lock request. If the callback is being made on behalf of an unlock request, the string will be prefixed with “#”.

Lock modes may be any of the following:

1—Auto Write Lock

2—Not Locked

4—Shared Write

8—Read

10—Exclusive Write


V Functions
vector_image
ver
vl-acad-defun
vl-acad-undefun
vl-arx-import
vl-bb-ref
vl-bb-set
vl-catch-all-apply
vl-catch-all-error-message
vl-catch-all-error-p
vl-cmdf
vl-consp
vl-directory-files
vl-doc-export
vl-doc-import
vl-doc-ref
vl-doc-set
vl-every
vl-exit-with-error
vl-exit-with-value
vl-file-copy
vl-file-delete
vl-file-directory-p
vl-file-rename
vl-file-size
vl-file-systime
vl-filename-base
vl-filename-directory
vl-filename-extension
vl-filename-mktemp
vl-get-resource
vl-list*
vl-list->string
vl-list-exported-functions
vl-list-length
vl-list-loaded-vlx
vl-load-all
vl-load-com
vl-load-reactors
vl-mkdir
vl-member-if
vl-member-if-not
vl-position
vl-prin1-to-string
vl-princ-to-string
vl-propagate
vl-registry-delete
vl-registry-descendents
vl-registry-read
vl-registry-write
vl-remove
vl-remove-if
vl-remove-if-not
vl-some
vl-sort
vl-sort-i
vl-string->list
vl-string-elt
vl-string-left-trim
vl-string-mismatch
vl-string-position
vl-string-right-trim
vl-string-search
vl-string-subst
vl-string-translate
vl-string-trim
vl-symbol-name
vl-symbol-value
vl-symbolp
vl-unload-vlx
vl-vbaload
vl-vbarun
vl-vlx-loaded-p
vlax-3D-point
vlax-add-cmd
vlax-create-object
vlax-curve-getArea
vlax-curve-getClosestPointTo
vlax-curve-getClosestPointToProjection
vlax-curve-getDistAtParam
vlax-curve-getDistAtPoint
vlax-curve-getEndParam
vlax-curve-getEndPoint
vlax-curve-getFirstDeriv
vlax-curve-getParamAtDist
vlax-curve-getParamAtPoint
vlax-curve-getPointAtDist
vlax-curve-getPointAtParam
vlax-curve-getSecondDeriv
vlax-curve-getStartParam
vlax-curve-getStartPoint
vlax-curve-isClosed
vlax-curve-isPeriodic
vlax-curve-isPlanar
vlax-dump-object
vlax-ename->vla-object
vlax-erased-p
vlax-for
vlax-get-acad-object
vlax-get-object
vlax-get-or-create-object
vlax-get-property
vlax-import-type-library
vlax-invoke-method
vlax-ldata-delete
vlax-ldata-get
vlax-ldata-list
vlax-ldata-put
vlax-ldata-test
vlax-make-safearray
vlax-make-variant
vlax-map-collection
vlax-method-applicable-p
vlax-object-released-p
vlax-product-key
vlax-property-available-p
vlax-put-property
vlax-read-enabled-p
vlax-release-object
vlax-remove-cmd
vlax-safearray-fill
vlax-safearray-get-dim
vlax-safearray-get-element
vlax-safearray-get-l-bound
vlax-safearray-get-u-bound
vlax-safearray-put-element
vlax-safearray-type
vlax-safearray->list
vlax-tmatrix
vlax-typeinfo-available-p
vlax-variant-change-type
vlax-variant-type
vlax-variant-value
vlax-vla-object->ename
vlax-write-enabled-p
vlisp-compile
vlr-acdb-reactor
vlr-add
vlr-added-p
vlr-beep-reaction
vlr-command-reactor
vlr-current-reaction-name
vlr-data
vlr-data-set
vlr-deepclone-reactor
vlr-docmanager-reactor
vlr-dwg-reactor
vlr-dxf-reactor
vlr-editor-reactor
vlr-insert-reactor
vlr-linker-reactor
vlr-lisp-reactor
vlr-miscellaneous-reactor
vlr-mouse-reactor
vlr-notification
vlr-object-reactor
vlr-owner-add
vlr-owner-remove
vlr-owners
vlr-pers
vlr-pers-list
vlr-pers-p
vlr-pers-release
vlr-reaction-name
vlr-reaction-set
vlr-reactions
vlr-reactors
vlr-remove
vlr-remove-all
vlr-set-notification
vlr-sysvar-reactor
vlr-toolbar-reactor
vlr-trace-reaction
vlr-type
vlr-types
vlr-undo-reactor
vlr-wblock-reactor
vlr-window-reactor
vlr-xref-reactor
vports