Ade,
Create a donut in a drawing and list it. What kind of object is it? IOW, there is no "Donut" object. But, we can duplicate what Autodcad does:
(defun c:mydonut()
(my-adddonut
(getdist "\nInside diameter: ")
(getdist "....Outside Diameter: ")
(getpoint "\nCenter point: ")
)
(princ)
)
(defun my-adddonut (Rin Rout ctr / ctr end pline r start wid)
(setq wid (- Rout Rin)
r (+ Rin wid))
(setq start (polar ctr 0.0 r)
end (polar ctr pi r)
)
(setq pline (vlax-invoke
(vla-get-modelspace
(vla-get-activedocument
(vlax-get-acad-object)
)
)
'addlightweightpolyline
(list (car start) (cadr start) (car end) (cadr end))
)
)
(vla-setbulge pline 0 1.0)
(vla-put-closed pline :vlax-true)
(vla-setbulge pline 1 1.0)
(vla-put-constantwidth pline wid)
pline
)