I use custom accelerators and just added the pan option. Works well with CTRL and numpad arrows, but regular numpad always echos the number which screws up the next command. The remaining code is used to offset dimension lines a standard amount of 3/8" times the dimension scale.
Dan
***ACCELERATORS
["NUMPAD5"]^P(xyz_keydist "get" nil)
["NUMPAD6"]^P(xyz_keydist "0" nil)
["NUMPAD9"]^P(xyz_keydist "45" nil)
["NUMPAD8"]^P(xyz_keydist "90" nil)
["NUMPAD7"]^P(xyz_keydist "135" nil)
["NUMPAD4"]^P(xyz_keydist "180" nil)
["NUMPAD1"]^P(xyz_keydist "-135" nil)
["NUMPAD2"]^P(xyz_keydist "-90" nil)
["NUMPAD3"]^P(xyz_keydist "-45" nil)
[CONTROL+"NUMPAD5"]^P(xyz_keydist "get" 2.0)
[CONTROL+"NUMPAD6"]^P(xyz_keydist "0" 2.0)
[CONTROL+"NUMPAD9"]^P(xyz_keydist "45" 2.0)
[CONTROL+"NUMPAD8"]^P(xyz_keydist "90" 2.0)
[CONTROL+"NUMPAD7"]^P(xyz_keydist "135" 2.0)
[CONTROL+"NUMPAD4"]^P(xyz_keydist "180" 2.0)
[CONTROL+"NUMPAD1"]^P(xyz_keydist "-135" 2.0)
[CONTROL+"NUMPAD2"]^P(xyz_keydist "-90" 2.0)
[CONTROL+"NUMPAD3"]^P(xyz_keydist "-45" 2.0)
["F1"]^p(princ "\nHelp disabled, used menu")(princ)
;;;=========================================================================
;;; xyz_KEYDIST - Combines input distance with direction for use with numeric keypad accelerators
;;;=========================================================================
(defun-q xyz_keydist ( angle mult / return)
(if (= 0 (getvar "cmdactive"))
;; pan if no command active
(progn
(command "-pan" (getvar "viewctr") (strcat "@" (rtos (/ (getvar "viewsize") -4.0)) "<" angle))
)
;; return number if active
(progn
(if (not mult)(setq mult 1))
(if (or (not xyz_KEYDIST_VALUE)
(= angle "get")
) ;or
(setq xyz_KEYDIST_VALUE
(xyz_getdist nil ;no base point
"\nEnter distance for keypad entry" ;prompt
;; (if xyz_KEYDIST_VALUE ;use global if it exists, else 3/8" in drawing scale
;; xyz_KEYDIST_VALUE
(* 0.375 (getvar "dimscale"))
;; )
) ;xyz_getdist
) ;setq
) ;if
(setq return (strcat "@" (rtos (* mult xyz_KEYDIST_VALUE)) "<" angle))
)
)
(if return return (princ))
) ;defun
;;;==========================================================
;;; Get Distance with Default - from Looking Glass Microproducts
;;;==========================================================
(defun-q xyz_getdist (base prmpt default)
(Setq
prmpt (Strcat
prmpt
(If default
(Strcat " <" (RtoS default) ">")
""
)
": "
)
)
(Cond
((If base
(GetDist base prmpt)
(GetDist prmpt)
)
)
(default)
)
)