02-22-2021
08:42 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
02-22-2021
08:42 AM
For this I use this little LISP combined with macros.
USERR1 and USERR2 variables are saved in the drawing.
(defun c:PD ( / d1 d2) ;define variables
(initget 6) ;0 input and negative values not allowed (6 = 2 + 4)
(setq d1 (getreal "\nVertical distance : "))
(setvar "USERR1" d1)
(initget 6)
(setq d2 (getreal "\nHorizontal distance : "))
(setvar "USERR2" d2)
;(princ "\nVertical: " d1)
;(princ "\nHorizontal: " d2)
(princ)
)
Just create new commands in CUI with your own name and description and copy the corresponding macro line to the macro field. For panning I use Ctrl+arrows.
PanDOWN
^C^C-pan 0,0 0,$M=$(getvar,userr1)
PanUP
^C^C-pan 0,0 0,$M=-$(getvar,userr1)
PanLEFT
^C^C-pan 0,0 $M=$(getvar,userr2),0
PanRIGHT
^C^C-pan 0,0 $M=-$(getvar,userr2),0
If you want to use the stored value to not just pan, but copy, you can create new commands like:
Copy UP
^C_copy 0,0,0 0,$M=$(getvar,userr1),0
Copy DOWN
^C_copy 0,0,0 0,$M=-$(getvar,userr1),0