Named Layer Filters

Discussion in 'AutoCAD' started by MagicJS, Jan 25, 2005.

  1. MagicJS

    MagicJS Guest

    These filters are taking over like viruses. Every architectural drawing I
    receive have thousands of them, making files many times larger.
    The "Delete All" button takes five minutes on some files. Does anyone know a
    fast command or script that can delete them all.

    MagicJS
     
    MagicJS, Jan 25, 2005
    #1
  2. MagicJS

    cadcoke3 Guest

    This is an AutoCAD bug... they cannot be deleted and are added to any
    drawing that inserts a file with layer filters. Here is a LISP routine
    to delete them (sorry don't know the origial source).

    ;;Routine to delete layer fileters, which are otherwise impossible
    ;;to remove and will propigate to any drawings where the file is
    inserted.
    ;;Type DLF to start routine.

    (defun C:DLF (/ eprLayFilt lstTemp lstFilters enaFilter)
    (setq eprLayFilt
    (entget
    (cdr
    (assoc
    360
    (entget
    (cdr
    (assoc
    360
    (entget
    (cdr
    (assoc 330
    (entget (tblobjname "LAYER" "0"))
    )
    )
    )
    )
    )
    )
    )
    )
    )
    )
    (foreach lstTemp eprLayFilt
    (if (= (car lstTemp) 360)
    (progn
    (princ lstTemp)
    (setq lstFilters (append lstFilters (list (cdr lstTemp))))
    )
    )
    )
    (if lstFilters
    (foreach enaFilter lstFilters (entdel enaFilter))
    )
    (princ)
    (princ "All layer filters have been deleleted")
    )
     
    cadcoke3, Jan 25, 2005
    #2
  3. MagicJS

    cadcoke3 Guest

    This is an AutoCAD bug... they cannot be deleted and are added to any
    drawing that inserts a file with layer filters. Here is a LISP routine
    to delete them (sorry don't know the origial source).

    ;;Routine to delete layer fileters, which are otherwise impossible
    ;;to remove and will propigate to any drawings where the file is
    inserted.
    ;;Type DLF to start routine.

    (defun C:DLF (/ eprLayFilt lstTemp lstFilters enaFilter)
    (setq eprLayFilt
    (entget
    (cdr
    (assoc
    360
    (entget
    (cdr
    (assoc
    360
    (entget
    (cdr
    (assoc 330
    (entget (tblobjname "LAYER" "0"))
    )
    )
    )
    )
    )
    )
    )
    )
    )
    )
    (foreach lstTemp eprLayFilt
    (if (= (car lstTemp) 360)
    (progn
    (princ lstTemp)
    (setq lstFilters (append lstFilters (list (cdr lstTemp))))
    )
    )
    )
    (if lstFilters
    (foreach enaFilter lstFilters (entdel enaFilter))
    )
    (princ)
    (princ "All layer filters have been deleleted")
    )
     
    cadcoke3, Jan 25, 2005
    #3
  4. MagicJS

    MagicJS Guest

    Thanks a lot cadcoke, the script works great.

    MagicJS
     
    MagicJS, Jan 25, 2005
    #4
  5. MagicJS

    R.K. McSwain Guest

    You say they can't be deleted, then supply a routine to delete them....

    One of, if not the original author is R. Robert Bell

    BTW, named layer filters are not propogated starting with R2005.
     
    R.K. McSwain, Jan 26, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.