TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DanB on October 05, 2011, 04:30:16 PM
-
Using the following code:
(defun c:lp ()
(command ".layerp")
)
Why do I not get the various outputs at the command line, such as "Restored previous layer status." or "*No previous layer status*" that I get if I type "layerp" on the command line? I have other similar shortcuts I have made for ".laycur" and ".laymcur" that still continue to show their respective outputs.
Thanks
Dan
-
Check your CMDECHO variable.
-
Check your CMDECHO variable.
Right, Set it's value back to 1 and problem will be solved. If in some of your rountine you set it to 0 at begin, you should re-set it's value at the end
-
If you just make shortcuts, you also can use aliases wich will fire the command instead of running it inside lisp.
-
I think we're missing something here. CmdEcho? Are you sure? That's not going to affect the text displayed from inside the LayerP command is it? I thought that would turn on/off the display of issuing the LayerP command onto the command-line.
Now NoMutt may have an influence ... I'd think.
But! :laugh: I think we're going too far with this. The code tells me there's a nil that will display on the command line. And as people generally make the command-line as small as possible, this probably scrolls the LayerP's message off-screen.
So try modifying your code thus:(defun c:lp ()
(command "_.LayerP")
(princ)
)
That should sort out the nil at the end of the "shortcut".
-
I at one point I did have the (princ) in my code and my cmdecho was in fact set to zero(0). Changing it to one(1) has gotten the desired results.
If anyone cares to share a different approach it is welcome but I have a startup LISP routine that loads my custom routines as well as where I create small codes for my own command aliases. This is how I track my own preference settings and customization.
Thanks for feedback.
-
FYI
http://forums.cadalyst.com/showthread.php?t=6390