Missing Connection Between Nested Shared Families And Their Hosts Inside Projects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all, I created a purge command which doesn't delete unused family types and instead only deletes entirely unused families. One side effect of my command is that it is deleting nested shared families from unused family types, which cannot happen. The family types themselves are not deleted though, just specific nested families they rely on, which render those family types unusable.
Example: an office chair which has a type A (without armrests) and a type B (with armrests as nested shared families). If I only use type A in my project, my command will purge the armrests family from the project, which is not something I'd like to happen.
I'm struggling to find a connection between these unused shared families and their used hosts inside projects. I've tried to use GetSubcomponentIds() but I need FamilyInstances to be able to use it, which is not the case if the families were never placed.
I've also seen this post but opening every family in the project to collect all the nested parts would take too long.
Any suggestions and ideas would be greatly appreciated. Thanks for reading.