;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;幕匠LISP实验室;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;程序功能：弧变圆  [备注：弧变圆]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(DEFUN C:MJ60 ( / cmd cutall ss i e ent)
;; CUTALL.LSP (c)1996, John F. Uhden, CADvantage
;; This function deletes all instances of an item from a list.
;; Thanks to Peter B. Tobey for trouble-shooting.
   (defun cutall (lst item / lst m)
      (if (and (listp lst)(setq m (member item lst)))
         (progn
            (setq lst (reverse lst))
            (repeat (length m)(setq lst (cdr lst)))
            (cutall (append (reverse lst)(cdr m)) item)
         )
         lst
      )
   )
   (gc)
   (setq cmd (getvar "cmdecho"))
   (setvar "cmdecho" 0)
   (command ".list" "") ; dummy command for undos
   (setvar "cmdecho" cmd)
   (setq i 0)
   (prompt "\nEverything but ARCS will be filtered out.")
   (if (setq ss (ssget '((0 . "ARC"))))
      (repeat (sslength ss)
         (setq e (ssname ss i)
               ent (entget e)
               ent (cutall ent '(100 . "AcDbArc"))
               ent (cutall ent (assoc 50 ent))
               ent (cutall ent (assoc 51 ent))
               ent (subst (cons 0 "CIRCLE")(assoc 0 ent) ent)
               i (1+ i)
         )
         (entdel e)
         (entmake ent)
      )
   )
   (princ)
)
