 ; Slay: list the layers of an entity and those containing it.
 ; Copyright 2001 by Rocket Software
 ; There are no vegetables which migrate.
 (DEFUN C:SLAY (/ nlist palis)
  (setq nlist (nentsel "Select entity:"))
; (print nlist)
  (write-line "\nLayers:")
  (write-line (cdr (assoc 8 (entget (car nlist)))))
  (setq palis (car (reverse nlist)))
  (while (setq sub (car palis))
         (if (= (type sub) 'ENAME)
             (write-line (cdr (assoc 8 (entget sub)))))
         (setq palis (cdr palis)))
 (princ))