Originally Posted by
tharwat313
Here is another way and with the same result .
Code:
(defun c:g12 (/ dia cen)
(if (and (setq dia (/ (getreal "\nDiameter of Polygon :") 2.0))
(setq cen (getpoint "\nCenter of Polygon :"))
)
(vl-cmdf "_.polygon" 12 cen "_c" dia))
(princ)
)
Tharwat
Remove possible errors...
Code:
(defun c:g12 (/ p d)
(if (and (setq p (getpoint "\nSpecify center of polygon: "))
(not (initget 6))
(setq d (getdist "\nSpecify diameter of polygon: "))
)
(command "_.polygon" 12 "_non" p "_c" (/ d 2.))
)
(princ)
)