Filter Rule

Hi

I’m trying to make it so that when I select a Structural Framing, a View Filter will be created.
But it always comes back with a “blank” Reference Level.
Did I do something wrong with the Rule Type? It’s already set to “Equals”
image

Also, when I run it in Dynamo Player / re-run it in Dynamo by selecting a different element, the previous run will be overwritten. How do I stop this?
I tried placing the Transaction.Start and Transaction.End. But it still doesn’t work.

Also, is there other ways of selecting Colour Palette for Dynamo Player? It seems to be unsupported
image

Thanks
View Filter.dyn (49.3 KB)

Edit:
I’m using Revit 2022

This should only happen(?) when the graph is ran in Dynamo.
It is because of Element binding. See this post.
Remove the Element binding save it and then only run it with the Dynamo Player.

PS
Most of the time it is also a good idea to not only post your .dyn but also a screenshot
with previews of the node.
image

Some people on this forum - who might be able to help you - might have no access to a computer but can help just by seeing a screenshot of the graph.

1 Like

Thanks for the reply
Went through the post. Downloaded Dynamo Beyond to remove the bind. Works! :smiley:
Thanks!


This is a Screenshot of the FilterRule.ByRuleType part

I guess we miss a part of the graph (right of ‘Filter Naming’)?

Also don’t forget to show the output of the nodes.
image

Maybe this topic will get you somewhere?

The filter is looking for the Reference Level element. You’re providing the name. Skip the Element.Name node when creating the filter in your graph and try again.

With how it’s currently set up, it creates a Filter, just that it doesn’t set the Reference Level directly.
If I skip the Element.Name, it comes back with error, and no filter is created.

image

His method seems to work on Level, but not Reference Level

Hi @Potato have you tried OOTB or archilab

1 Like

I followed exactly like yours, but the Filter Rule comes back as Null

seems you use archilab now…for ruletype is equal and not Equal…use archilabs ruletype node…and see if it could be better

2 Likes

Arhhh
I didn’t know they are different o.o
The name and the function shows the same, but doesn’t work if swapped. Weird.

It works now

The next thing that I want to do is to set it so that for each Reference Level, there will be one Filter.
my Current flow creates mutiple Filter Rules instead.

What did I do wrong here?

EDIT: Arh… List.Chop…

1 Like

Its all about list level and lacing :wink:
Revit_qxF6ciCTO7

1 Like

Is there a Dynamo Node that counts all of the LEVELS created in the project?
I tried looking around the forum and it keeps coming back with info on LEVELS in Lists.

I want to find the number of LEVELS created in the project.
If its 5 levels, then it becomes 0,1,2,3,4 and place them in colour range, so that I can Override the Graphic Settings.
I saw guides for doing this, but not on the count of all levels created in the project

image

This only comes back with a 1… lol

you could try this one here, if i understand ;:wink:

or

View Filter Overall.dyn (62.9 KB)

Thank you very much!
Managed to do this for Structural Framing

Now I want to make it so that it works for Structural Column for Base Level and Floor for Level
I tried and it didn’t work, can you see whats wrong with my work?


I transpose the filters, but it didn’t work

Thanks!

1 Like

no not really, but guess its about some sorting…try with first one element and then scale up when that works…

I still can’t understand what I did wrong

Works when it’s only Structural Framing, but doesn’t when I add in Floor

Does it mean that Rules have to be Categories which contains the exact same parameter?
If thats the case, Reference Level =/= Level, so the dyn is failing?

I don’t think it should be an issue cuz Revit allows multiple categories of different parameter, but I can’t understand what I did wrong from the error given.

Multiple categories in View Filter Create rule

allright have just given a fast test…it works…just about sorting ,list level, lacing…play around with it :wink:

1 Like