Skip to content

elementPreDelete

Adam Bear edited this page Jul 31, 2018 · 1 revision

This script prompts the user to select an element in Revit. It will then run (but not commit) a transaction to delete this element. The transaction is rolled-back - but we are able to get the ElementIds of all of the elements which WOULD have been deleted had this transaction been committed. We can use the ElementIds to see which elements are dependent on the user-specified element

Gif

In the example below, we see that deleting a wall would affect the hosted door and its dimensions, deleting the door would affect the dimensions and deleting the dimension would only affect itself.

Wrapped Wall

elementPreDelete

Clone this wiki locally