Element IDs and IndexOf - Questions

This is my first post here as I’m starting to dip my toes into the Dynamo waters. I’ve seen some really great ideas and help from this forum, so I hope someone can point me in the right direction.

I’m having trouble taking a list of Element IDs (list “A” in the image below) and converting them into elements (in this case, they’re walls). When I try to convert them (B), I get no matches ©.

I tried a workaround where I grabbed all the walls in the project and then pulled their Element IDs (D). I wanted to pare the entire list down to only the ones I needed from the first list (A) by first finding the index number of each item, then I’d eventually list them by index to get them in the same order as the first list (A). I thought “IndexOf” (E) would have been how to do it, but I keep getting an output I wasn’t expecting (F). I tried manually inserting an Element ID number as an input into IndexOf and it worked fine… so I think I’m misusing my list somehow.

Anyways, I’m totally stuck. I’ve tried every workaround that I could think of but haven’t progressed.

Any help would be greatly appreciated!

The image above wasn’t the one I meant to post.

I can’t seem to edit my first post, so here’s the correct one with the labeling.

There are a few issues. First of all the package you’re using “IDs to Elements” has been depreciated because it was originaly written for prior versions of dynamo.

Lucky andydandy has updated all his packages for dynamo 0.72, You need to download the “Clockwork for Dynamo 0.7” from the package manager which has a ton of useful stuff.

You can get additional info from here: https://github.com/CAAD-RWTH/ClockworkForDynamo

Finally ever since Revit 2014 came out, they changed the functionality of the API and in particular the Document.GetElement part so that it only works with UniqueIDs (GUIDs) and not IDs any more.

So you could try is the following instead:

2014-10-30_115635

 

 

 

 

The “Element.ByID” is the revised version of “IDs to Elements” from andydandy’s Clockwork packages.

Thanks! That was incredibly helpful and clearly explained.

I really appreciate the effort to help!