Filtering by mask

Hello guys I am trying to do a very simple exercise within dynamo but my knowledge of python is 0 and of dynamo 1, so you can imagine the situation, jejeje
Ok, here it is:
I want to populate a parameter value based on the area, for example
if area >10m2 then A
at the same time if 10<area<20 then B
and if area is greater or iqual than 20 then C
I am trying to do this using filter by mask but I think it is impossible to set this range using a filter.
How can I easyly achieve this?
Attached my intent…
Many thanksCapture

Hello BIMadmin,

If you simply put the output of AreaElement into the list inputs for your List.FilterByBoolMask and retain the same logic as your top most group, then it should work.

thank you very much Sol, but I do not know what you mean, can you explain it please???

You can combine logic of boolean values to make more complex ones. What you are looking for is a form of “and” that return true if both your conditions are true. then use that as your bool mask.

Capture

I do not think it is possible to do a if(Area>A,and(Area<B),then C) using filters

Thank you very much guys,
I think I got it, not sure why the parameters values are not copied…

1 Like

Any ideas why the parameters values are not copied…???

By copied, you mean that the data isn’t flushed to the revit elements?

Save and reopen the graph
Run the graph in manual
Verify the parameters name
Use the builtin “SetParameterValueByName” node. You use a custom one that could act differently and not show some errors.

Hello everything seems to be working fine, however this is part of a bigger exercise which is create area boundaries and areas based on rooms.
I have a passthrough node that stays just after the area creation and using the collector area node, the problem is that area values are all 0, not really sure why the passthrough node is not working…
Any ideas???

When I use a passthrough dummy node, I usually pass EVERYTHING in it, As to stop the whole script. Right now it still passes your elements to the filters. It doesn’t seem to be causing any problem in your case, but, food for thoughts.

Try and get the Area parameter manually instead of using the collector node, see if that works. I have these kind of problem because I use the french version of revit and most custom nodes call english parameters. However that doesn’t seem your case eighter.

Maybe drop the collector, you already seem to have the list of areas you want just before the passthrough. They can always be sorted by level after.

How can i call the areas without using the area collector?

I have tried get parameter value by name but it does not work for the Area parameter???