(defun c:trc(/ obl ocm oce oco olderr  ss s sn n slen cen rad ceco celt)
  (setq obl (getvar "blipmode")
	ocm (getvar "cmdecho")  os (getvar "osmode")
	olderr *error*  oce (getvar "celtype")  oco (getvar "cecolor")
       *ERROR* AI_ABORT)
  (setvar "cmdecho" 0) (setvar "osmode" 0)
  (command "_.UNDO" "_GROUP")
(command "ucs" "w")
  (setvar "blipmode" 0)
  (setq slx (ssget))
  (setq slen (sslength slx)
        n 0)
  (while (< n slen)
    (setq ss (ssname slx n)
          s (entget ss)
          sn (cdr (assoc 0 s)) )
    (if (= sn "CIRCLE")
      (progn
      (setq cen (cdr (assoc 10 s)))
      (setq rad (cdr (assoc 40 s)))
      (setq ceco (cdr (assoc 62 s)))
      (if (= ceco nil) (setq ceco "bylayer"))
      (setq celt (cdr (assoc 6 s)))
      (if (= celt nil) (setq celt "bylayer"))
      (command "erase" ss ""
               "color" ceco
               "celtype" celt
               "arc" "c" cen (polar cen 0 rad) "a" 270 )
    ) )
    (setq n (+ n 1))
  )
  (command "_.UNDO" "_E")
(command "ucs" "p")
  (setvar "blipmode" obl) (setvar "cecolor" oco) (setvar "celtype" oce)
  (setvar "cmdecho" ocm)  (setvar "osmode" os)
  (setq *error* olderr) 
  (princ)
 )