04-30-2023
04:24 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
04-30-2023
04:24 AM
For some things, that is already available [read about the DIMLAYER and HPLAYER System Variables].
For others, you can undefine and redefine the command name:
(command "_.undefine" "XLINE")
(defun C:XLINE ()
(setvar 'clayer "YourPreferredXlineLayer")
(command "_.XLINE")
)
You could also have it return the current Layer to what it was before, after you finish the XLINE command:
(command "_.undefine" "XLINE")
(defun C:XLINE (/ lay)
(setq lay (getvar 'clayer))
(setvar 'clayer "YourPreferredXlineLayer")
(command-s "_.XLINE")
(setvar 'clayer lay)
)
If you sometimes have reason to draw XLINEs not on that Layer, type in the command with a period prefix:
.XLINE
to force use of the native command, not your redefinition.
Kent Cooper, AIA