How to create a View Filter Rule for a Material?

Hi,
did anyone noticed that when creating View filter, using ParameterFilterElement.ByRules, Dynamo creates view filter but it wont select Filter rule type.


But if i choose the right rule type Dynamo wont fill in the parameter value.
If anyone has any ideas how to fix this, i would realy appreciate the help.
I am also dynamo script file. Test_3D.dyn (26.3 KB)

I would not be so quick when proclaiming that Dynamo is making the mistake here: It seems to be working just fine for me:

I highlighted a few important nodes in this definition. First and foremost the Structural Material parameter is a Type parameter, so you can only retrieve it from a Floor Type object. Secondly, Material parameters are assigned via their Element Id reference, so that’s what you need to compare here. Not a name, not an actual material object, but its Id. Once you do these things, Dynamo will gladly create an appropriate filter for you.

1 Like

hi @Konrad_K_Sobon
May I know where can i find the Parameter.Filter.Element.By.Rules? which packages ? many thanks

Hello, I tried your exact sequence of nodes and the element.id data does not fit the filterrulebyruletype node.

Maybe there is another approach to that function since this topic is 2 years old ?

1 Like

Did you figure this out?

Hi Konrad,
This is no longer true.
Using Element.Id to pass the material to the value input does not work.
Using Material.ByName for the value input makes the FilterRule node no longer have an error but it just spits out a null.


1 Like

yeah same here with ootb in 24…but funny enough if we use Konrads own nodes it works :wink:

1 Like