(defun c:dp (/ cen rad c n ocm obl olderr p1 p2 p3 p4 p5 r s sl ss)
  (setq olderr *error* *error* ai_abort 
	ocm (getvar "cmdecho")   obl (getvar "blipmode")
	oco (getvar "cecolor"))
  (setvar "cmdecho" 0) 	(command "_.UNDO" "_GROUP")  (setvar "blipmode" 0)
  (princ "\n请选择需要填充的管釘孔：")
  (setq n 0 s (ssget))
  (repeat (sslength s)
    (setq ss (entget (ssname s n))
	 cen (assoc '10 ss)
	 rad (assoc '40 ss)
	   c (list (nth 1 cen) (nth 2 cen))
	   r (cdr rad)
	  p1 (polar c 1.570796 r)
	  p2 (polar c 0 r )
	  p3 (polar c 4.712388 r)
	  p4 (polar c 3.1415926 r)
	  p5 (cdr (assoc 10 ss))
           n (1+ n))
       (command "cecolor" "4" "solid" p1 p5 p2 p1 "") 
  )
  (redraw)
  (setq *error* olderr)
  (setvar "blipmode" obl) (setvar "cmdecho" ocm) (setvar "cecolor" oco)
  (command "_.UNDO" "_E")
  (princ)
)

