# Selection - Selecting Elements using element IDs

**URL:** <https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223>\
**Category:** Revit\
**Created:** [December 3, 2018, 8:18pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223 "2018-12-03T20:18:01Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 3, 2018, 8:18pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/1 "2018-12-03T20:18:01Z")

</div>

Hello community,

I am fairly new to dynamo, but I am working on selecting elements in Revit by using their ID numbers. I currently have all the IDs of the elements I want to override. I cant figure how to get those ids from a list and select the actual element. Below is what I have so far… What am I missing? Any help is much appreciated!!!

 ![image001](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/5/d5d78064fb10dae77441b806bbfe23429c87d948.png)  
Cheers,  
LW

---

<div class="post-metadata">

**Author:** ![L-Vettz](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@L-Vettz](https://forum.dynamobim.com/u/L-Vettz)\
**Post date:** [December 3, 2018, 8:38pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/2 "2018-12-03T20:38:33Z")

</div>

There should be a Clockwork node called Element.ByID that can get you what you want I think.

I don’t know what the rest of your graph looks like, so I can’t tell you if there is an easier way to do it or not. But if you have a list of IDs that you need to get a list of elements with than Element.ByID should help you.

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 3, 2018, 8:44pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/3 "2018-12-03T20:44:42Z")

</div>

Awesome!! Thank you! I’m downloading that package now!! Ill update once its done!  
Thank you again,  
LW

---

<div class="post-metadata">

**Author:** ![L-Vettz](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@L-Vettz](https://forum.dynamobim.com/u/L-Vettz)\
**Post date:** [December 3, 2018, 8:56pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/4 "2018-12-03T20:56:54Z")

</div>

Cool. If you haven’t already, I recommend getting Bakery, archilab, LunchBox, Rhythm, and Springs packages as well. They all contain useful nodes that are good on their own and often used as dependents for other packages you may find later.

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 4, 2018, 3:02pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/5 "2018-12-04T15:02:18Z")

</div>

So apparently I am terrible at this… but my list keeps going null. I think my input is wrong. I tried 2 different nodes, element.ID and element.ByID, but both are still null… I think it wants that list combined to a one line of text separated by semicolons. Is my thinking correct? Or any other suggestions?  
Thank you again!!!  
Cheers,

 ![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c0cc5f9e6b131a56ca902b87938efa8706ed6a1e.png)

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [December 4, 2018, 3:19pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/6 "2018-12-04T15:19:12Z")

</div>

Seems to me you are trying to select elements from a linked file by their ID  
I think you can only have the ID’s of the current document to play with

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 4, 2018, 3:28pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/7 "2018-12-04T15:28:36Z")

</div>

I am using this for clash purposes I don’t need the element from the linked file. This is kind of a Frankenstein script as of now. I was slicing the ones from the linked file out earlier and was exploring other options. I have a coordination view in Revit already set up. If i only highlight elements in my file that is totally fine.

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [December 4, 2018, 3:30pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/8 "2018-12-04T15:30:34Z")

</div>

Anyway try to use a StringToNumber node to convert text to integer.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/a/7ad69709d0b7fd69877899b46a02b22b37512a85.png)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [December 4, 2018, 3:39pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/9 "2018-12-04T15:39:43Z")

</div>

You can select Elements by their ElementId with the internal Dynamo method _(as long as they are in your model)_.

You do have to do it in a code block though.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/f/6f421d61c3b58a0fd1a1e5ee94fdbe36004f2d30.jpeg)

in a codeblock: `Revit.Elements.ElementSelector.ByElementId(elemId)`

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 4, 2018, 4:10pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/10 "2018-12-04T16:10:39Z")

</div>

Thank you all, I got it to work ill clean it up and post!!!

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [December 4, 2018, 5:05pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/11 "2018-12-04T17:05:35Z")

</div>

> [@LucW](#):
>
> Thank you all, I got it to work ill clean it up and post!!!

Please do. It’s nice to see people share the results!

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 7, 2018, 4:20pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/12 "2018-12-07T16:20:20Z")

</div>

So this workflow was created to help my team correct navis clashes. I have about six guys needing to correct clashes, but they aren’t all well versed in Navis. So basically, I mirrored the views that were clashed in Navis, into Revit. Then exported the clash results we received the from the Contractor. Using Dynamo I was able to override the graphics of the clashed elements within Revit. Now my team goes the their assigned view and can start correcting the clashes right away. Its very simple and basic, but it has speed out correction process up tremendously. Thank you all for your contributions and help to make this possible!! The dynamo community is the best around!!!

 ![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0d210e63ae8e0f01da0913147b30b1303481fae1.png)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [December 7, 2018, 4:27pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/13 "2018-12-07T16:27:59Z")

</div>

Could you please zoom in before taking a screenshot ? 🙂  
Unfortunately, we cannot see the name of the nodes you used ☹

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 7, 2018, 4:41pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/14 "2018-12-07T16:41:27Z")

</div>

![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/0/50e6f3115c8eef00f3626b8c2c063fbc0d31fb59.png)

---

<div class="post-metadata">

**Author:** ![LucW](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@LucW](https://forum.dynamobim.com/u/LucW)\
**Post date:** [December 7, 2018, 4:42pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/15 "2018-12-07T16:42:03Z")

</div>

Sorry about that! Didn’t even notice.

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [December 7, 2018, 4:43pm UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/16 "2018-12-07T16:43:41Z")

</div>

Neat ! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Thomas\_LiB](https://avatars.discourse-cdn.com/v4/letter/t/50afbb/32.png) [@Thomas\_LiB](https://forum.dynamobim.com/u/Thomas_LiB)\
**Post date:** [June 23, 2021, 7:38am UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/17 "2021-06-23T07:38:38Z")

</div>

In wich package do you find the Element.ByID node ?

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [June 23, 2021, 7:44am UTC](https://forum.dynamobim.com/t/selection-selecting-elements-using-element-ids/29223/18 "2021-06-23T07:44:54Z")

</div>

@Thomas_LiB …here you have some options, if you dont wanna use @john_pierson method in post #8

 ![Screenshot 2021-06-23 063747](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/3/5330a37bcf15d724bf812bea7b5aedc3cc0cef5b.jpeg)
