The lisp below does most of what I need it to do. Basically "for me" its similar to layerisolate. I then select all on the screen.
(defun C:SELECTLAYER ( / e lay)
(setq e (nentsel "Select entity on a layer: "))
(if e (ssget "_X" (list(cons 8 (cdr(assoc 8 (entget(car e))))))))
(command "_select" "previous")
)
(C:SELECTLAYER)
I can usually run the routine but hit cancel, type in select previous and I get the result I am looking for. Am I missing another line? Thanks!!!