Jump to content

Lengthen-delta


Kate M

Recommended Posts

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: ld

lengthen

Select an object or [DElta/Percent/Total/DYnamic]: de

Enter delta length or [Angle] :

Enter delta length or [Angle] : 6

Link to comment
Share on other sites

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) 
)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 9 years later...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...