Finding empty inplace families

First a small introduction to the problem: in revit when you create an inplace family and immediately try to close it, you will get a notification that the element will be deleted because it is empty. However, when you create an inplace family, link a dwg inside it, close it and then delete the dwg from Manage Links, then the family instance will stay in the family browser (as sort of a container). You can right-click select it, but not view it. I have a project full of them and would like to delete them systematically.

So I’m looking for a way to find out whether an inplace family instance is ‘empty’, so I can then delete them. The API doesn’t seem to contain any methods for achieving this within the FamilyInstance Class.

Does anyone have an idea how this would be achievable?

Hi @mho ,

First Filter the Inplace family then convert to Geometry. If there is no geometry then delete that.

will be a simple process I think.

Thanks for the reply. That kind of works. We found out by trial and error that it’s even better to look for the element’s Bounding Box, otherwise Void type families will not be recognised by the Element.Geometry node.

Yes, it’s a good idea. If you share your script images it will help others to find the solution.

1 Like

2 Likes