# Select elements by parameter

**URL:** <https://forum.dynamobim.com/t/select-elements-by-parameter/6371>\
**Category:** Revit\
**Tags:** revit\
**Created:** [September 26, 2016, 2:13pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371 "2016-09-26T14:13:24Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![kveleva](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kveleva/32/26740_2.png) [@kveleva](https://forum.dynamobim.com/u/kveleva)\
**Post date:** [September 26, 2016, 2:13pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/1 "2016-09-26T14:13:24Z")

</div>

Hi all,

I only started working with dynamo last week and I really tried finding the answer to this, because it seems infuriatingly simple, but i’ve seriously hit a rock.

How can I select a a set of elements that have a parameter value that contains or it si equal to something?  
Ie, i want to select all the corridirs in my project.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [September 26, 2016, 2:33pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/2 "2016-09-26T14:33:18Z")

</div>

Hi @kveleva

There are many ways to do that . Here is one way that , I think, is pretty clean :

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/b/be3d33a2db1089169caa0b6b4b9f576e16b2eabc.png)

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/1/14dcc9c18a45f31cd89ddc11a8a378b12707f9ce.png)

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 2:33pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/3 "2016-09-26T14:33:22Z")

</div>

Try selecting all elements of category and then filtering by a value in the parameter.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/9f6ed87e69b1859ea3ae0f983b9cbfe6f59b5b6e.png)

---

<div class="post-metadata">

**Author:** ![kveleva](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kveleva/32/26740_2.png) [@kveleva](https://forum.dynamobim.com/u/kveleva)\
**Post date:** [September 26, 2016, 2:49pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/4 "2016-09-26T14:49:02Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 2:53pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/5 "2016-09-26T14:53:43Z")

</div>

You got more than you asked for! 🙂 Good work @Mostafa_El_Ayoubi!

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Calvert](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nathaniel\_Calvert](https://forum.dynamobim.com/u/Nathaniel_Calvert)\
**Post date:** [September 26, 2016, 9:23pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/6 "2016-09-26T21:23:42Z")

</div>

I’m trying to achieve something similar. My goal is to override wall cut colors based on their base constraints. Here is what I have. Right now it changes every wall’s color regardless of their base constraint. My gut says I need to filter my list of walls somehow, but that’s the disconnect of my previous grasshopper knowledge and my relatively nonexistent dynamo knowledge… Any help or links to better discussions are appreciated.

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/5/5df875e25296ae3f55e0b1cc126b102cc25b7a6f.PNG)

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 9:29pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/7 "2016-09-26T21:29:24Z")

</div>

Look how @Mostafa_El_Ayoubi has a “list.first item” node you are missing.

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Calvert](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nathaniel\_Calvert](https://forum.dynamobim.com/u/Nathaniel_Calvert)\
**Post date:** [September 26, 2016, 9:32pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/8 "2016-09-26T21:32:19Z")

</div>

Even with it I get the same result, the list is still all included in the first item. Can I add a branch to the tree somehow? Sorry for the inexperience/grasshopper lingo

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Calvert](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nathaniel\_Calvert](https://forum.dynamobim.com/u/Nathaniel_Calvert)\
**Post date:** [September 26, 2016, 9:35pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/9 "2016-09-26T21:35:11Z")

</div>

My file so far

[Wall Base Constraints Color Override.dyn](https://forum.dynamobim.com/uploads/short-url/9f0Sa7fNj7KOlVsW1oC3H0uSQzm.dyn) (10.0 KB)

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 9:40pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/10 "2016-09-26T21:40:57Z")

</div>

The output of GroupbyFunction should be two lists, but it looks like equality doesn’t work for levels.

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 9:56pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/11 "2016-09-26T21:56:01Z")

</div>

Here are two options:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/f/f6054f10ddb893dd05f999cc4b9d3aa93372035e.png)

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [September 26, 2016, 9:57pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/12 "2016-09-26T21:57:39Z")

</div>

@kveleva Were you able to get the original ones to work for your parameters?

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Calvert](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nathaniel\_Calvert](https://forum.dynamobim.com/u/Nathaniel_Calvert)\
**Post date:** [September 26, 2016, 10:09pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/13 "2016-09-26T22:09:10Z")

</div>

I managed to get it by finding the indices of the desired walls in the list by their level parameter.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/2/2bdc8762a20d238bb5ad2a9b31eacd04cb83da4b.PNG)

---

<div class="post-metadata">

**Author:** ![kveleva](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kveleva/32/26740_2.png) [@kveleva](https://forum.dynamobim.com/u/kveleva)\
**Post date:** [September 27, 2016, 8:20am UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/14 "2016-09-27T08:20:36Z")

</div>

yep it worked fine 🙂

---

<div class="post-metadata">

**Author:** ![dan\_buys](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dan\_buys](https://forum.dynamobim.com/u/dan_buys)\
**Post date:** [October 14, 2016, 6:13pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/15 "2016-10-14T18:13:05Z")

</div>

Disclaimer - very new to Dynamo.  
I am trying to Select Structural Framing members that are beam drags. I started with Timon’s first response. I am only getting false readings from my == node. So it is telling me there are no members that have “Beam Drag” as the field in the “Start Connection” Parameter. Which is not the case.

I put a watch node on the my get parameter value node and it is coming back with None or StructuralConnectionType?? there are some beams that have ‘None’ as the “Start Connection”, but none of them have StructuralConnectionType. Could someone help me with this one?

I can’t upload since I am a new user.

---

<div class="post-metadata">

**Author:** ![dan\_buys](https://avatars.discourse-cdn.com/v4/letter/d/df705f/32.png) [@dan\_buys](https://forum.dynamobim.com/u/dan_buys)\
**Post date:** [October 14, 2016, 7:23pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/16 "2016-10-14T19:23:37Z")

</div>

@Timon could you help me with this one?

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [October 15, 2016, 10:31am UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/17 "2016-10-15T10:31:08Z")

</div>

Hi @dan_buys. This topic is not really adressing your issue. check out this one:

> [@Select the Beam Connection type "None"](https://forum.dynamobim.com/t/select-the-beam-connection-type-none/6698/3):
>
> Awesome! This is exactly what i was looking for. Thanks Kulkul!

---

<div class="post-metadata">

**Author:** ![Timon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/timon/32/12035_2.png) [@Timon](https://forum.dynamobim.com/u/Timon)\
**Post date:** [October 16, 2016, 8:32pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/18 "2016-10-16T20:32:55Z")

</div>

@dan_buys I agree with @Mostafa_El_Ayoubi. This is not exactly what this thread is talking about, so I’ll summarize for those who are new to the Dynamo environment and general Revit API. Some parameters are stored as Booleans (true/false), others as text, others as numbers, and other as elements or something completely different. In many cases if I am trying to filter by these you can either filter by the information as it is stored, (e.g. compare structural connections to structural connections, etc). or you can use the String from Object Node (then I can compare string to string). What @dan_buys and (trust me we have all done it) was trying to do was compared and element to a string (or text). Thus it will always tell you that an object with a name of “Moment Connection” will never equal the text “Moment Connection”. I hope this is helpful and only answer it in this context because I believe it will assist others who are learning about filtering by parameter. This is not only applicable to Structural Connections, but many other areas.

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [October 16, 2016, 11:16pm UTC](https://forum.dynamobim.com/t/select-elements-by-parameter/6371/19 "2016-10-16T23:16:29Z")

</div>

Closed on October 16, 2016, 11:16pm UTC


