Try this: Procedure SelectShorterLines; {If the first selected object in the drawing is a line} {this script gets the length of that line and selects all} {other lines in the drawing that have a shorter length.} {September 11, 2015} {February 13, 2012} {© 2015, Pat Stanford} {© 2012, Coviana, Inc - Pat Stanford} {Licensed under the GNU Lesser General Public License} Var H1 :Handle; OLength :Real; Procedure DoIt(H2:Handle); Begin If HLength(H2)End; Be