If statement tied to Revit Element IDs

Dynamo Gurus.

I have an excel sheet that has a set of data responsible for generating an equivalent set of Revit objects. After the definition runs, I manually move around the generated objects in Revit as needed. If I hit run again, all objects go back to the location dictated by the excel sheets number - so far very logical. I’m trying to create an “If” statement, that would allow me to say: if a list item has already been generated in Revit as an object (i.e. has an element I.D) - Do not move it - and just impact newly added or edited indices in the original list. Thoughts appreciated!

 

I would suggest you find a different way to do this, because id numbers between projects can differ for the same object, so therefore think about the name of the object or a parameter that could be used then filter the objects by that name.

Or how about a rewrite script that runs the script/places objects then gets their ID’s and puts it into the same excel file then just add a filter for this.