Jump to content

Recommended Posts

Posted

This is making me crazy(er?)! I have a nice, long, Lisp with almost every CAD command in it. It is basically a learning exercise to familiarize myself with the command applications in Lisp. I reach one of the last sections, and... nothing I try has worked. I simply want to replace some dims that were erased earlier. My lines are not p-lines. The code for this section is below. Can someone please give me a hint? The discussions I have found were concerning p-lines, or were completely over my rookie-Lisper head! Thanks for any ideas!

Doug

 

 

 
; add 3 new dimensions
(setq dim1 (getpoint "\nFirst dim. point :"))
(setq dim2 (getpoint "\nNext dim. point :"))
(command "._dimlinear" "_non" dim1 "_non" dim2) 

(alert "yes?")
(princ)
) ;end of program

Posted

You have to specify the end point of the Dim. Text.

 

Regards,

 

Tharwat

Posted

Try this in your command line .....

 

(command "_.dimlinear" '(0 0 0) '(100 0 0) '(0 10 0))

Posted

Thanks for the help, but as soon as I clicked on "dim2", it skipped right to my alert message. I'm only drawing in 2D- should I adjust something? I understand that there must be some method of aligning the text and lines, but just can't seem to find it...

Thanks again, tho! :D

Posted

Yes. that means you did not give it a try ... so take it completely.

(setq dim1 (getpoint "\nFirst dim. point :"))
(setq dim2 (getpoint "\nNext dim. point :"))
(setq dim3 (getpoint "\n dim. Text location :"))
(command "._dimlinear" "_non" dim1 "_non" dim2 "_non" dim3 ) 

Posted

Works like a charm now, and I understand where I went wrong- which makes it even better! I did not add the "dim3" line, just substituted your command line with the coordinates. A rookie mistake by a rookie programmer.

Thank you so much! I'm off to learn more now!

 

Doug

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