# Filtering by mask

**URL:** https://forum.dynamobim.com/t/filtering-by-mask/18692
**Category:** Revit
**Created:** [February 1, 2018, 1:46pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692 "2018-02-01T13:46:20Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 1:46pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/1 "2018-02-01T13:46:20Z")

</div>

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 thanks ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/4/34fddae8e3069c5cb8ed1842f2e8c9d06794808d.JPG)

---

<div class="post-metadata">

### Author: ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)
#### Post date: [February 1, 2018, 1:55pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/2 "2018-02-01T13:55:55Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 2:15pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/3 "2018-02-01T14:15:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![slepagetrudeau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/slepagetrudeau/32/29983_2.png) [@slepagetrudeau](https://forum.dynamobim.com/u/slepagetrudeau)
#### Post date: [February 1, 2018, 2:27pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/4 "2018-02-01T14:27:40Z")

</div>

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](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/8/084e4d4e0186cd1620b3988240b9c6645981578d.PNG)

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 2:28pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/5 "2018-02-01T14:28:51Z")

</div>

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

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/5/b5277911496078e412204433f6695c546b742c7a.JPG)

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 2:45pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/6 "2018-02-01T14:45:00Z")

</div>

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

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/0/800aca8d1fc32df46c875aac5eacdf29297b9bba.JPG)

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 2:48pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/7 "2018-02-01T14:48:48Z")

</div>

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

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/82e108a6f118c0e5c622366797a3ab6610299c5b.JPG)

---

<div class="post-metadata">

### Author: ![slepagetrudeau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/slepagetrudeau/32/29983_2.png) [@slepagetrudeau](https://forum.dynamobim.com/u/slepagetrudeau)
#### Post date: [February 1, 2018, 2:59pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/8 "2018-02-01T14:59:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 3:24pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/9 "2018-02-01T15:24:48Z")

</div>

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???

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/b/5bdeaa49a6a7fc537ac5684e2f615f9eca7940c6.JPG)

---

<div class="post-metadata">

### Author: ![slepagetrudeau](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/slepagetrudeau/32/29983_2.png) [@slepagetrudeau](https://forum.dynamobim.com/u/slepagetrudeau)
#### Post date: [February 1, 2018, 3:46pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/10 "2018-02-01T15:46:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)
#### Post date: [February 1, 2018, 3:52pm UTC](https://forum.dynamobim.com/t/filtering-by-mask/18692/11 "2018-02-01T15:52:50Z")

</div>

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???
