- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Problem redefining hatch command
I have the following lines in a lisp routine which I load with Startup Suite. I want to redefine the hatch command to ensure hatch associativity is selected by default:
(defun c:hatch ()
(if (= (getvar “hpassoc”) 0)
(setvar “hpassoc” 1)
)
(command “.hatch”)
)
(command “undefine” “hatch”)
It doesn't seem to be working, and undefining 'HATCH' seems to break the 'h' keyboard shortcut defined in the PGP file, so that "h" brings up HALOGAP.
I've tried putting the "undefine" both before and after the replacement hatch function, but it doesn't seem to make any difference.
Not sure what I am doing wrong...?
thanks in advance
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Hi,
I think you don't need to redefine HATCH command.
Try this:
(defun c:H () (if (= (getvar "hpassoc") 0) (setvar "hpassoc" 1) ) (initdia) (command "._HATCH") )
I added (initdia) function call in order to show Hatch Visor, without it you should work with hatch options only via command prompt.
Maxim
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community