Kate M Posted December 3, 2003 Posted December 3, 2003 Hey guys, I just tried to make my very first lisp routine -- it's supposed to choose the delta option in the lengthen command so I don't have to. It seems to work fine, but I can't figure out how to keep it from displaying two lines of "enter delta length." I tried removing the (princ), but then it put "nil" after the first line -- the command still worked. Any suggestions on fixing this? Thanks!! -Kate ;;;Lengthen Delta (defun c:ld() (command "lengthen" "de") (princ) ) Command: ldlengthen Select an object or [DElta/Percent/Total/DYnamic]: de Enter delta length or [Angle] : Enter delta length or [Angle] : 6 Quote
fuccaro Posted December 4, 2003 Posted December 4, 2003 like this? (defun c:ld() (command "lengthen" "de" pause pause "") (princ) ) or a bit more complicated, but with the same functionality: (defun c:ld( / cmd) (setq cmd (getvar "cmdecho")) (setvar "cmdecho" 0) (command "lengthen" "de" pause pause "") (setvar "cmdecho" cmd) (princ) ) Quote
Kate M Posted December 5, 2003 Author Posted December 5, 2003 Fuccaro, The first one *almost* works...but it ends after one pick (I think that's the "" at the end?) -- I tried playing around with deleting the pauses, but that put in extra lines around the "Select an object to change or [undo]:"...not quite as annoying as it was when I first tried the lisp, but I'm still not quite sure where the extra lines are coming from. Quote
fuccaro Posted December 9, 2003 Posted December 9, 2003 May I try again? (defun c:test() (setvar "cmdecho" 0) (princ "\n Distance? ") (command "lengthen" "de" pause) (princ) ) Quote
Kate M Posted December 9, 2003 Author Posted December 9, 2003 Yay! That's it! Not bad for being on vacation... ;-) Hope you enjoy it! Quote
hyposmurf Posted December 10, 2003 Posted December 10, 2003 Where you on vacation Fuccaro?Do you ever stop working? Quote
jdrealtalk Posted February 5, 2013 Posted February 5, 2013 I just want to know how to draw a ten feet line using the delta command at the command line. Quote
fuccaro Posted February 7, 2013 Posted February 7, 2013 The discussion was about lengthen an existing line. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.