Drawing reactor (opening or closing a drawing :VLR-DWG-Reactor file) DXF file handling reactor (reading and writing) :VLR-DXF-Reactor :VLR-Editor-Reactor General editor reactor (available for backwards compatibility) Block insertion reactor :VLR-Insert-Reactor Linker reactor :VLR-Linker-Reactor :VLR-Lisp-Reactor LISP reactor Reactors that are not part of other reactor :VLR-Miscellaneous-Reactor types (pick first changes and layout switching) :VLR-Mouse-Reactor Mouse reactor (right-click and double-click) :VLR-Object-Reactor Object reactor (appending and modifying objects) System variable reactor :VLR-SysVar-Reactor :VLR-Toolbar-Reactor Toolbar reactor (toolbar images change size) Undo reactor :VLR-Undo-Reactor Writing a block reactor :VLR-Wblock-Reactor :VLR-Window-Reactor AutoCAD or drawing window reactor (window is moved or resized) XREF reactor (attaching, reloading, or :VLR-XREF-Reactor detaching) For more information about reactors, take a look at the Reference Guide” in the “AutoLISP AutoCAD online help. When reactors you cannot call a command using the Command function; this is Important: due to the way reactors are designed. You must use the Visual LISP functions and the COM API to mimic the behavior of the commands that you need. Command Reactor Command reactors are one of the most commonly used reactors. They you to be notified when a command is started, ends, gets cancelled, or fails for some reason. The following sample code shows how to watch for a specific command, in this case the Hatch, and perform a task before the command even begins. ;; to see if our custom command reactors ;; have been loaded into the current drawing (if (= hyp-rctCmds nil) (setq hyp-rctCmds (vlr-command-reactor nil '((:vlr-commandCancelled . hyp-cmdAbort) (:vlr-commandEnded . hyp-cmdAbort)
:VLR-DWG-Reactor Drawing reactor (opening or closing a drawing file) :VLR-DXF-Reactor DXF file handling reactor (reading and writing) :VLR-Editor-Reactor General editor reactor (available for backwards compatibility) :VLR-Insert-Reactor Block insertion reactor :VLR-Linker-Reactor Linker reactor :VLR-Lisp-Reactor LISP reactor :VLR-Miscellaneous-Reactor Reactors that are not part of other reactor types (pick first changes and layout switching) :VLR-Mouse-Reactor Mouse reactor (right-click and double-click) :VLR-Object-Reactor Object reactor (appending and modifying objects) :VLR-SysVar-Reactor System variable reactor :VLR-Toolbar-Reactor Toolbar reactor (toolbar images change size) :VLR-Undo-Reactor Undo reactor :VLR-Wblock-Reactor Writing a block reactor :VLR-Window-Reactor AutoCAD or drawing window reactor (window is moved or resized) :VLR-XREF-Reactor XREF reactor (attaching, reloading, or detaching) For more information about reactors, take a look at the “AutoLISP Reference Guide” in the AutoCAD online help. Important: When reactors you cannot call a command using the Command function; this is due to the way reactors are designed. You must use the Visual LISP functions and the COM API to mimic the behavior of the commands that you need. Command Reactor Command reactors are one of the most commonly used reactors. They you to be notified when a command is started, ends, gets cancelled, or fails for some reason. The following sample code shows how to watch for a specific command, in this case the Hatch, and perform a task before the command even begins. ;; to see if our custom command reactors ;; have been loaded into the current drawing (if (= hyp-rctCmds nil) (setq hyp-rctCmds (vlr-command-reactor nil '((:vlr-commandCancelled . hyp-cmdAbort) (:vlr-commandEnded . hyp-cmdAbort)
v3_CP4177_Ambrosius.docx