I am looking for a lisp routine that will allow for me select all lines of a specific length. The one I currently and using does not work the way I want. For example it will work on lines of say 1" but will not work with lengths of 3.875". Finding the problem in the routine below is beyond me. Thanks. (defun c:linelength() (if (not asked-length)(setq asked-length 660.0)) ; just a length (setq answer-asked-length (getreal (strcat "Enter length <" (rtos asked-length) ">:"))) (if answer-asked-length (setq asked-length answer-asked-length)) (setq tolerance 1e-12) (setq entity-list nil) (setq entity-list (ssadd)) ; create new, empty selection set (setq teller 0) (setq entlyst (ssget "X")) ; select every thing in the drawing (setq entlystl (sslength entlyst)) (while (< teller entlystl) ; test through all entities (setq entityname (ssname entlyst teller)) (setq entdatalyst (entget(ssname entlyst teller))) (setq enttype (cdr(assoc 0 entdatalyst))) (if (= enttype "LINE") ; test if entity is a line (progn (setq assoc10 (assoc 10 entdatalyst)) (setq p10 (cdr assoc10)) ; WCS coordinates (setq p10 (trans p10 0 1)) ; UCS coordinates (setq assoc11 (assoc 11 entdatalyst)) (setq p11 (cdr assoc11)) ; WCS coordinates (setq p11 (trans p11 0 1)) ; UCS coordinates (setq line-length (distance p10 p11)) (if (< (abs(- line-length asked-length))tolerance) ; test length of line (setq entity-list (ssadd entityname entity-list)) ) );progn );if (setq teller (+ 1 teller)) );while (setq set entity-list) ; short name for the set of selected objects (princ (sslength set))(princ " lines selected")(princ) (princ ", Call this set in responce to 'select objects' with: !set")(princ) );defun (princ " Start command: linelength")(princ)