(setq ent (entsel "\n Select entity to set layer to total"))
(setq lay (cdr (assoc 8 (entget (car ent)))))
(setq sl
(ssget '((0 . "LWPOLYLINE,CIRCLE,POLYLINE,ELLIPSE,REGION,SPLINE")
(8 . lay)
)
)
)
(ssget
(list
'(0 . "LWPOLYLINE,CIRCLE,POLYLINE,ELLIPSE,REGION,SPLINE")
(cons 8 lay)
)
)