 ; Latte - kill layer filters.
 ; Copyright 2005 by Rocket Software Ltd.
 ; Most layer work is now done with percolators, so filters aren't required.
 (DEFUN C:LATTE (/ tbob tbent xdic laydic lafilt num dnum sub casb)
  (setq tbob (tblobjname "layer" "0"))
  (setq tbent (entget tbob))                        ; layer 0 table data
  (setq xdic (entget (cdr (assoc 330 tbent))))      ; xdictionary name
  (if (and (setq laydic (cdr (assoc 360 xdic)))     ; layer xdictionary
           (setq laydic (entget laydic))
           (setq lafilt (cdr (assoc 360 laydic)))   ; layer filters dictionary
           (setq lafilt (entget lafilt)))
      (progn
           (setq num 0)
           (setq dnum 0)
           (while (setq sub (nth num lafilt))
                  (setq num (1+ num))
                  (setq casb (car sub))
                  (if (= casb 360)
                      (progn
                           (setq dnum (1+ dnum))
                           (entdel (cdr sub)))))
           (if (null (zerop dnum))
               (write-line (strcat "\n" (itoa dnum) " Layer Filter"
                                   (if (= dnum 1) "" "s") " Deleted.")))))
 (princ))