Wblock and filters...Help!!!

Discussion in 'AutoCAD' started by Geoff Olner, Dec 11, 2004.

  1. Geoff Olner

    Geoff Olner Guest

    Generally using Wblock to "block out" items from a file will result in all
    filters from the inital file also being attached to the second file.

    Whilst in some cases this is "irritating" I have a particular file that I
    need to Wblock a portion from and DO require the filters to be taken with
    it. Unfortunately this refuses to happen on several different PC's.

    I guess there is a "system variable" that magically turns off the ability to
    extract the filters within individual files.

    Anyone know what it is, or any help on solving this problem? If so it may be
    useful to stop unwanted filters being taken with Wblocks in the future.

    Many thanks in anticipation.

    Geoff Olner
    Architectural Images -Sheffield
     
    Geoff Olner, Dec 11, 2004
    #1
  2. Geoff Olner

    Jeff Guest

    If you mean the Named Layer Filters then there is no way to stop them from
    propagating themselves in releases prior to 2005. I don't have 2005, but
    there may be such a variable in that version.

    For versions 2000- 2004 delete the unwanted filters in your drawings, load
    this lisp and type: filtrdel

    (defun c:filtrdel (/ names)
    (vl-Load-Com)
    (textscr)
    (princ "\nRoutine to delete all but the specified Layer filters. When
    entering filter
    names to retain, wildcards are allowed. i.e., entering \"zz*,xx*\" will
    delete all filters except those beginning with zz and xx.")
    (setq names (getstring "\nEnter filter names to retain, press Enter for
    none: "))
    (vl-Catch-All-Apply
    '(lambda ()
    (setq dicts (vla-GetExtensionDictionary
    (vla-Get-Layers
    (vla-Get-ActiveDocument
    (vlax-Get-Acad-Object)
    )
    )
    )
    )
    (vlax-for dict dicts
    (if (and (= (vla-get-name dict) "ACAD_LAYERFILTERS")
    (> (vla-get-count dict) 0))
    (progn
    (vlax-for filtr dict
    (if (not (wcmatch (vla-get-name filtr) names))
    (vla-delete filtr)
    )
    )
    )
    )
    )
    )
    )
    (graphscr)
    (princ "\nSpecified layer filters have been deleted.")
    (princ)
    )
     
    Jeff, Dec 12, 2004
    #2
  3. Geoff Olner

    R.K. McSwain Guest

    In 2005, named layer filters are not carried along with copy/paste,
    wblock/insert operations.
     
    R.K. McSwain, Dec 13, 2004
    #3
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.