发布于:2010-02-25 16:43:25
来自:建筑设计/CAD下载及教程
[复制转发]
(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 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 "")
)
全部回复(8 )
只看楼主 我来说两句回复 举报
回复 举报