I downloaded the following code from The Swamp. It searches for and deletes lines whose lengths fall between 1.25" and 3.0". It was submitted as a solution to someone else's problem by Tharwat. It works as advertised. However, my situation is slightly different. Changing the length parameters are easy enough. I need to search for LWPolylines of a specific length. How could I modify this code to do that? I'm wondering if it is even possible.
Code:(defun c:Test (/ ss i sn l) (if (setq ss (ssget "_:L" '((0 . "LINE")))) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i)))) (setq l (distance (cdr (assoc 10 (entget sn))) (cdr (assoc 11 (entget sn))))) (if (or (eq l 1.25) (eq l 3.0) (and (> l 1.25) (< l 3.0))) (entdel sn) ) ) ) (princ) )