Hotkey / Macro Examples
A few example Macros are installed with AutoHook, but the real power is in customization. Feel free to add to them, modify them, or just delete them and replace them with your own.
Below are some example Hotkey Definitions with detailed descriptions. The underscores before command names are not required in non-English versions of ZWCAD.
Example 1.
Hotkey:
@E Macro: _endp{space}It runs endpoint object snap. The Macro Command
{space} is optional — a regular space also works. The {enter} Macro Command would work too.>
Example 2.
Hotkey:
^#I Macro: {esc}-insert My Block{enter}s 1 r 0{space}Plays when you press
Ctrl+Shift+I.Inserts a block named “My Block.” It uses
{esc} to cancel current commands, {enter} to handle names with spaces, and -INSERT to force the command line version.Useful hyphen-based commands:
-INSERT, -BLOCK, -WBLOCK, -LAYER, -PAN, -ARRAY, -HATCH. Consider setting FILEDIA=0 to avoid dialogs.Example 3.
Hotkey:
#RButton Macro: '_-pan {click}(getvar "viewctr"){space}Plays when you press
Shift+Right Mouse Button.Enables transparent panning using
{click} and AutoLISP. Don't confuse AutoHook's {} with AutoLISP's ().Example 4.
Hotkey:
*E Macro: (command "sh" (strcat "start explorer " (getvar "dwgprefix")))(princ){space}Win+E redefined to open Explorer at the drawing's folder (ZWCAD only).Example 5.
Hotkey:
F2 Macro: {esc}_line{space}Hotkey:
||F2 Macro: {F2}Single tap
F2 runs LINE. Double tap ||F2 restores default F2 (text screen). If it triggers LINE twice, adjust the DoubleTap Delay.Example 6.
Hotkey:
+E Macro: {esc}_erase _si {click}CapsLock+E runs ERASE SINGLE on the object under your mouse cursor using {click}.Example 7.
Hotkey:
<C Macro: {esc}_laymcur {click}Button4+C makes the layer of the clicked object current. See Mouse Buttons for more info on Button4 and Button5.