(defun c:de(/ ss len n shuzhi ent dxf) (setq ss (ssget '((0 . "*TEXT")))) (setq len (sslength ss)) (setq n 0) (command "undo" "begin") (repeat len (setq ent (ssname ss n)) (setq dxf (entget ent)) (setq shuzhi (atof (cdr (assoc 1 dxf)))) (if (<= shuzhi 2.5) (command "erase" ent "") ) (setq n (1+ n)) ) (command "undo" "end") ) 用这个试试 |