- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi guys,
I am in requirement of a lisp "When I enter a command that command result has to be shown in that layer"
For example "if I gave the command XLINE and I have a layer named XLN the Xline should automatically be assignedto the XLN layer"
¡Resuelto! Ir a solución.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
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.