Author Topic: Layer Filters  (Read 1121 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Layer Filters
« on: January 09, 2014, 09:38:21 AM »
Is there a way to turn on/off and freeze/thaw a layer filter group that is already setup in a drawing by either a script or lisp?

Lets say I have the following filters:

A
B
C
D

Is there a way to just either turn off A and C Layers?

thanks!
Civil3D 2020

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Layer Filters
« Reply #1 on: January 09, 2014, 01:20:16 PM »
AFAIK, the list of layers that meet the criteria of a given filter is not stored anywhere, only the layer filter definition is stored.

So IF (and that is a big IF) your layer filter is simple and only filters by layer name, then you could use the code in post #7 (here: http://www.cadtutor.net/forum/showthread.php?61032-Layer-Properties-Filters&p=414430&viewfull=1#post414430 ) and then drill your way down to the layer filter definition, then use that string in a command line LAYER FREEZE (or THAW) command since that will accept wildcards.

I *think* that if your layer filters are more complex than that, you'll have to gather the filter properties and iterate the layer list yourself building a list of layers to freeze/thaw.