Selection - Selecting Elements using element IDs

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


Cheers,
LW

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.

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

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.

2 Likes

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,

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

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.

Anyway try to use a StringToNumber node to convert text to integer.
image

1 Like

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.

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

5 Likes

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

1 Like

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

1 Like

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

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

1 Like

Sorry about that! Didn’t even notice.

Neat ! Thanks :slight_smile: