Pre-Delete Elements: Know What You're About to Delete



Hi all,

The question: how to know which elements would be deleted if I deleted a certain object in my model?
For instance, if I deleted a wall, can I get a list of its hosted objects which would also get deleted?

I’ve been looking for a Python version of this workflow for some time, so though I’d share.

Credit to @Deyan_Nenov for his macro version (I’ve just more or less transcribed it to Python) and to @Thomas_Mahon for various tips. Original macro can be found here:

The definition can be found here:

Element - Pre-Delete.dyn (8.1 KB)

Hopefully someone else finds it helpful!



Hey, I went ahead and changed the topic to Share since this is a solution and not a question.
Good work though!