Sunteți pe pagina 1din 8

Creating Filter Rules - List Manipulation

Revit

Thank you all very much! That was exactly it. I appreciate the help, this forum really is a great
resource!

cnealy can you post your results. I’ve been fighting with the exact same thing for a week and found
this post today. I’ve tired all the different post suggestions with lacing giving me the same results
either way. I’m also having a problem that the value is never stored in the filter.

Here is with one workset selected and handful of categories selected.

Filter Create 1 Workset Selected.png3554x1598 462 KB

Results look like this :

Filter Create 1 Workset Selected Results.png838x483 46.5 KB


With two worksets selected and lacing set to short:

Filter Create 2 Workset Selected Lacing Short.png3554x1598 464 KB

Results look like this:

Filter Create 2 Workset Selected Lacing Short Results.png837x487 47 KB


With two worksets selected and lacing set to long:

Filter Create 2 Workset Selected Lacing Long.png3554x1598 464 KB

Results look like this:

Filter Create 2 Workset Selected Lacing Long Results.png834x483 45.4 KB


I’m sure like everything I’ve learned about Dynamo when it doesn’t work, it’s something simple I’m
overlooking. I second your appreciation for this forum as an amazing source of nice and bright
people willing to help develop other skills.

Rule Type & Category not working with Create Filter1

Of course, see my full script below:

The premise is that it reads any element of “category:Part” in the model (our company uses Parts to
make pour drawings for concrete), reads the value of the shared parameter Pour ID that we made,
filters it by unique ID, removed the empty ones, and creates a filter where you apply it, turn off the
visibility, and all parts that don’t have the requisite Pour ID are hidden.

For example, if you want to only see Base Slab 101 (BS-101), you make a filter called Not BS-101
(where the Pour ID does not contain BS-101) and turn visibility off. My script makes one filter for
each unique Pour ID.

image.png2008x574 82.9 KB

image.png844x601 68.4 KB
image.png845x601 71 KB

Hope this helps!

Oct '17
Finally got it sorted out. Lacing was killing me but it was all in the part where you added the "Not " to
the name that helped keep the list down to the number of items in the list. I used “” and it worked just
fine.

Thanks everyone on this one. Now to move on to applying the filters & create different colors for
each one.
Create Filters From Workset Names Picking Worksets & Categories.png3602x1154 323
KB

Check out the OverrideGraphicSettings.ByProperties node in the Revit OOTB dropdown (Revit-
>Filter->OverrideGraphicSettings). I did something similar with a script I wrote. Combine this
with View.SetFilterOverrides and by playing with some of those inputs, you should get to where
you need to be.

Oct '17
When you worked on your script did you set it up to batch process the filters you created? I was
messing around today with the both of those and was just now figuring out how I can send lists to
the View.SetFilterOverrides node. When we start a project we can over 100 electrical panels that
we usually manually create the worksets, then filters for. I was working it up to read those panel
names from a spreadsheet and take care of all that manual work for us. The part that I haven’t got
ironed out yet is how to create different colors for each of the filters. This is what I’m playing with
right now.

Create Filter Color Overrides.png5276x2468 847 KB


Duh I see where I was messing up with converting to a string the output of my user selection.

Create Filter Color Overrides.png5072x2468 762 KB

The colors seemed to be random and seems to work ok.

Filter Colors.PNG823x638 30.4 KB

1
Mar 6
HI @awilliams
do you have any solution if i want to make 2 filter at the same time.
Filter A … rule greater X
Filter B … rule greater Y
(same parameter) …
Thanks

ASK.PNG1112x498 48.9 KB

Suggested Topics

Topic

Impot Revit Data to Excel

Analytical Node location export to excel

Deleting elements using Python


python revit dynamo

Filtering specific parameter from List.Sort Node

S-ar putea să vă placă și