;--------------------------
; Layerloeschen  AW 30.6.91
;--------------------------

(Defun C:DellayA ()
  (Setvar "Cmdecho" 0)
  (Setq A (Getstring "\nLayer to delete - Name: "))
  (Command "_erase" (Ssget "X" (Cons (Cons 8 (Eval A)) TEMPWORD)) "")
  (Princ)
)

(Defun C:DellayB ()
  (Setvar "Cmdecho" 0)
  (Setq A (Entsel "\nLayer to delete - select object: "))
  (If
    A
      (Progn
        (Setq A (Cdr (Assoc 8 (Entget (Car A)))))
        (Command "_erase" (Ssget "X" (Cons (Cons 8 (Eval A)) TEMPWORD)) "")
      )
  )
  (Princ)
)
