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.
Solved! Go to Solution.
Solved by Ranjit_Singh2. Go to Solution.
Maybe post what you have got so far and we can recommend changes?
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))
This is great! That's exactly what I was looking for. Thank you, your help is very much appreciated.
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.
Can't find what you're looking for? Ask the community or share your knowledge.