(defun c:elb ()
(setq r (getreal "Enter elbow r=? "))
(prompt "\nselect two line")
(setq a (ssget))
(command "fillet" "r" r)
(command "fillet" a)
(setq a1 (ssname a 0))
(setq a2 (ssname a 1))
(setq b1 (cdr (assoc 10 (entget a1))) c1 (cdr (assoc 11 (entget a1))))
(setq d1 (cdr (assoc 10 (entget a2))) e1 (cdr (assoc 11 (entget a2))))
(setq p1 (inters b1 c1 d1 e1 nil))
(if (< (distance p1 b1)(distance p1 c1))
    (command "donut" "0" "2" b1 "")
    (command "donut" "0" "2" c1 "")
)
(if (< (distance p1 d1)(distance p1 e1))
    (command "donut" "0" "2" d1 "")
    (command "donut" "0" "2" e1 "")
)
(princ)
)
