PDA

View Full Version : Redefine Qleader



jpaulsen
2004-11-17, 07:11 PM
I am trying to redefine the LE command (alias) to be LEADER instead of QLEADER and define QL to be QLEADER.

I am using the following code to define the commands:

(defun c:ql ()(command "qleader"))
(defun c:le ()(command "leader"))

The commands work, however, when I type LE or QL I am not prompted for a starting point. Instead it returns NIL. I am able to pick a starting point on the screen and proceed with the LEADER or QLEADER command but I know some users will be confused if they do not get the prompt.

How can I get the redefined commands to show the normal prompt?

P.S. I am aware that I can redefine the aliases in the PGP file. I want to use lisp because each user has their own PGP file. If I can use lisp I can change one file and it will affect the entire company.

rplato
2004-11-17, 07:34 PM
Try (defun c:ql ()(command "qleader")(princ))

jpaulsen
2004-11-17, 08:31 PM
I should have mentioned that I tried (princ). That suppresses the NIL but the prompt still does not display.

Mike.Perry
2004-11-17, 08:42 PM
Hi

Check your setting of CmdEcho

"rplato" offering works fine if CmdEcho = 1

Have a good one, Mike

jpaulsen
2004-11-17, 09:23 PM
CMDECHO was the problem. Setting it to 1 worked. Thanks Mike.

peter
2004-11-18, 11:49 AM
I would suggest that you use the aliasedit command to modify your acad.pgp file. There you can create aliases for the qleader and leader commands.



Peter Jamtgaard