Deleting elements using Python

try this

2 Likes

Perfect! If you have time, could you explain why the original node configuration did not work? I would like to understand so I don’t make a similar mistake in the future

Here is a copy of the working dyn in case anyone needs it.
Dynamo-StripAllNonWorkingViews-OOTB-R19.dyn (33.8 KB)

the script need Elements at input (one or several), inside the Python script ElementId of each element is obtained by the property Id
https://www.revitapidocs.com/2020/9235095b-b7ae-b6e5-6cc2-2b8d397644de.htm
then we delete them by Id
https://www.revitapidocs.com/2020/dd023de2-cf2b-03ca-6f45-89b5e867fe92.htm

1 Like

That makes sense. I took the syntax to mean it needed the raw id, not the element itself, in which it would pull its id.
Thank you!