(defun c:f2 (/ f2-layer-0 f2-layer ss i n f2-ss f2-ir) (setq f2-layer-0 (car (entsel "\n请选择对象图层:"))) (setq f2-layer (cdr (assoc 8 (entget f2-layer-0)))) (princ "\n请选择对象:") (setq ss (ssget (list '(0 . "text") (cons 8 f2-layer))))
(setq f2-layer-0 (car (entsel "\n请选择对象图层:")))
(setq f2-layer (cdr (assoc 8 (entget f2-layer-0))))
(princ "\n请选择对象:")
(setq ss (ssget (list '(0 . "text") (cons 8 f2-layer))))
(setq i 0
n (sslength ss)
f2-ss (ssadd)
)
(setq f2-ir (getreal "请输入小于的数值:"))
(while (< i n)
(setq f2-real (cdr (assoc 1 (entget (ssname ss i)))))
(if (< (atof f2-real) f2-ir)
(setq f2-ss (ssadd (ssname ss i) f2-ss))
)
(setq i (1+ i))
)
(command "erase" f2-ss "")
)
(defun c:f22 (/ f2-layer-0 f2-layer ss i n f2-ss f2-ir)
(setq f2-layer-0 (car (entsel "\n请选择对象图层:")))
(setq f2-layer (cdr (assoc 8 (entget f2-layer-0))))
(princ "\n请选择对象:")
(setq ss (ssget (list '(0 . "text") (cons 8 f2-layer))))
(setq i 0
n (sslength ss)
f2-ss (ssadd)
)
(setq f2-ir (getreal "请输入大于的数值:"))
(while (< i n)
(setq f2-real (cdr (assoc 1 (entget (ssname ss i)))))
(if (> (atof f2-real) f2-ir)
(setq f2-ss (ssadd (ssname ss i) f2-ss))
)
(setq i (1+ i))
)
(command "erase" f2-ss "")
)