去除了后entmod更新不了图元了
(defun c:1 () (setq YH_layer "1") (setq YH_selection (ssget)) (if YH_selection (progn (setq YH_repeat_times (sslength YH_selection)) (setq YH_index 0) (repeat YH_repeat_times (setq YH_getselect (entget (ssname YH_selection YH_index))) (setq YH_getselect (subst (cons 8 YH_layer) (assoc 8 YH_getselect) YH_getselect)) (setq YH_getselect (vl-remove (assoc 62 YH_getselect) YH_getselect)) (setq YH_getselect (subst (cons 6 "bylayer") (assoc 6 YH_getselect) YH_getselect)) (entmod YH_getselect) (setq YH_index (1+ YH_index)) ) ) ) (princ) ) |