Delete families from tree

Hi everybody,
I need to deliver a project which the customer should see just parts. In my families are nested several categories and I should delete some. Manually I could select them from the tree, right-click and erase. But I’m building custom nodes for a delivery standard for this customer but I can’t delete nested elements directly. Any idea?
Thx in advance


Your script is trying to delete all elements of category placed in your project.

If i understand your post correct, you are trying to delete all families of a category.
To delete them you have to feed families to the “Element.Delete”-Node and not their instances.
You could swap the “All Elements of Category”-node with “All Families Of Category”-Node from Clockwork

Exacetly what I was looking for thx a lot