 ; Lsl - select entities on a selected layer.
 ; Copyright 2005, 2006 by Rocket Software Ltd.
 ; Wet Otter - this summer's surprise hit fragrance.
 (DEFUN C:LSL (/ *error* prom enampt enam ss)
  (setvar "cmdecho" 0)
  (setq snapp (getvar "snapmode"))
  (setvar "snapmode" 0)
  (defun *error* (shk /)
   (setvar "snapmode" snapp)
  (princ))
  (if (= (type laya) 'STR)
      (setq prom (strcat "Layer <" laya "> or select entity: "))
      (setq prom "Entity on Layer: "))
  (if (setq enampt (entsel prom))
      (progn
           (setq enam (car enampt))
           (setq laya (cdr (assoc 8 (entget enam))))))
  (if (= (type laya) 'STR)
      (progn
           (princ laya)
           (prompt "\nSelect Stuff: ")
           (setq ss (ssget (list (cons 8 laya))))))
  (setvar "snapmode" snapp)
 (princ))