(defun c:ce (/ s ss n ce na olderr obl oco ocm olt pl pr pt pb xr)
  (setq olderr *error* *error* ai_abort
	 ocm (getvar "cmdecho")
	 obl (getvar "blipmode")
	 oco (getvar "cecolor")
         osnap(getvar "osmode")
	 olt (getvar "celtype"))
  (setvar "cmdecho" 0) (setvar "blipmode" 0) (setvar "osmode" 0) (command "_.UNDO" "_GROUP")
  (princ "\n请选择需加中心线的圆，弧.(可用crossing,window)")
  (princ)
  (setq ss (ssget) n 0)
  (repeat (sslength ss)
     (setq s (entget (ssname ss n))
	   n (1+ n)
          na (cdr (assoc 0 s)))
     (if (or (= na "CIRCLE") (= na "ARC"))
	(progn
	  (setq	ce (cdr (assoc 10 s))
          	xr (* (cdr (assoc 40 s)) 1.3)
	  	pl (polar ce 3.1415926 xr)
	  	pr (polar ce 0 xr)
	  	pt (polar ce 1.5707963 xr)
	  	pb (polar ce 4.7123889 xr))
     (command "ucs" "w")
     (command "cecolor" "1" "celtype" "center" "line" pl pr "" "line" pt pb "")
     (command "ucs" "p")
     )  )
  )
  (setvar "cmdecho" ocm)
  (setvar "cecolor" oco)
  (setvar "celtype" olt)
  (setvar "osmode" osnap)
  (setq *error* olderr) (command "_.UNDO" "_E") 
  (princ)
)