1st answer is that ChatGP is very unreliable so many times code is totally rewritten.
2nd "selects entities of a specified length from the entire drawing" length is not a searchable property must get object 1st then can get Length property.
You dont say what you want to do with answer so just made a list of lengths.
(defun c:wow ( / ss len)
(setq ent (entsel "\nPick a object for layer "))
(setq lay (cdr (assoc 8 (entget (car ent)))))
(setq ss (ssget (list (cons 0 "LWPOLYLINE,line,circle,Arc")(cons 8 Lay))))
(if (= ss nil)
(progn (alert "You have not selected any correct objects \nWill now exit")(exit))
)
(setq lst '())
(repeat (setq x (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
(setq objname (vlax-get obj 'objectname))
(cond
((= objname "AcDbArc")(setq len (vlax-get obj 'Arclength)))
((= objname "AcDbLine")(setq len (vlax-get obj 'length)))
((= objname "AcDbCircle")(setq len (vlax-get obj 'Circumference)))
((= objname "AcDbPolyline")(setq len (vlax-get obj 'length)))
)
(setq lst (cons len lst))
)
(princ)
)