(defun myss (minl maxl / e len n obj ss)
(if (setq ss (ssget '((0 . "LINE"))))
(repeat (setq n (sslength ss))
(setq e (ssname ss (setq n (1- n))))
(setq obj (vlax-ename->vla-object e))
(setq len (vlax-get obj 'length))
(if (or
(< len minl)
(> len maxl)
)
(ssdel e ss)
)
)
)
ss
)
(defun c:sss (/ a b ss)
(if (not (setq a (getdist "\n请指定最小长度<0.01>:")))
(setq a 0.5)
)
(if (not (setq b (getdist "\n请指定最大长度<0.08>:")))
(setq b 2.5)
)
(if (and
a
b
)
(if (setq ss (myss a b))
(command "._select" ss "" "._pselect" ss "")
)
)
(princ)
)