Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New Lisp Routine help

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1089 Views, 5 Replies

New Lisp Routine help

How do I create a lisp routine that draws a circle, then inscribes an equilateral triangle and circumscribes a square while only prompting the user to chose a center point and radius for the circle?  I am having trouble figuring out the lisp routine. 

5 REPLIES 5
Message 2 of 6
Shneuph
in reply to: Anonymous

Maybe post what you have got so far and we can recommend changes?

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
Message 3 of 6
Anonymous
in reply to: Shneuph

plus1.JPG

this is all I have 

Message 4 of 6
Ranjit_Singh1
in reply to: Anonymous

It's pretty simple using native Autocad commands, if I understand you correct

(defun c:somefunc  (/ cen rad)
 (command "._circle" (setq cen (getpoint "\nSpecify center point: ")) pause)
 (command "._polygon" 3 "_non" cen "_i" "_non" (setq rad (cdr (assoc 40 (entget (entlast))))) "._polygon" 4 "_non" cen "_c" "_non" rad))

tri_cir_square.gif

 

Message 5 of 6
Anonymous
in reply to: Ranjit_Singh1

This is great! That's exactly what I was looking for. Thank you, your help is very much appreciated. 

Message 6 of 6
Kent1Cooper
in reply to: Anonymous

If you do this often, I would suggest a little drawing of that with a 1-unit radius in the Circle.  Then you can just Insert it, with the scale factors being the desired radius -- a one-command rather than three-command process.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta