Deleted Unexpected Items using Elements.Delete/ DeleteElements/ Eraser.Tool

Hi all,

I am facing a problem with deleting elements. Some of the elements are deleted unexpectedly after running dynamo. I have tried to use different packages, including “Elements.Delete” from archilab, “DeleteElements” from Springs and “Eraser.Tool” from SteamNodes, but the same problem exists.

In my case, I am trying to convert an footing into floor using dynamo.
My original element is already drawn on revit.
image

After running my script once, the footing could be removed and a floor could be generated successfully.
image

However, an “empty” element will be stored in my dynamo script. If I run the dynamo script again (even I freeze all the existing nodes), the newly created floor will also be deleted unexpectedly.

You may find the script in this file.
Element Delete Problem.dyn (22.2 KB)

Thank you very much for your help.

Hi @htmokac

Have you tried using this script through the Player?

So make some Foundations and Convert them to Floors. Are the new floors also disappearing when you run the script on a new Foundation?

I think the problem is in the Session Trace Data (or “Bindings”) inside the Dynamo script. Everytime you run the script, Dynamo tries to do everything again and tries to “Update” the floor. The original elements (The foundation) is missing and Dynamo Updates the new Floor by Deleting this. The Dynamo player doens’t save those bindings.

Also good to check out: Element Binding in Revit

There are some View Extensions which remove the Bindings for you.

1 Like