Get lines subcategories and geometry from all instances of a family

Hi everybody,

I working at the moment on a superfamily, which is basically only a Generic Model with furniture inside, and lines, indicating where should be the walls, doors, etc…:

I placed several instances of this family in a project.
I would like to generate automatically walls, doors in a project where those lines are. For that I created different subcategories, to distinguish the purpose of each line (door line, wall line…).

THE PROBLEM is, I can’t get the lines subcategories!

Thanks to @Alban_de_Chasteigner and his package Genius Locci I have the lines, it is perfect:

But then, I have tried several nodes and I can’t get the subcategories of these lines. I know it is because they are subcategories of family, and I am running the script in the project, but if anyone has a solution it would be great !

Thanks a lot !

Have a look here: Get lines by subcategory in a project - #34 by JacobSmall


Hi Jacob !

Unfortunately, it gives null results or makes my Revit crash haha, which is rare btw :slight_smile:
I will try to open your custom node and try to figure sthing out
Thanks a lot for the support :slight_smile:

Can you share one of those families for me? A journal from your crash would also be good. :slight_smile:

I found a way !

I used the Python script of your custom node, and modified it a little! Thanks a loooot !
Then I made a second script to Get the subcategory.

Of course I could have merged the scripts easily, but now I know what came from your node and comes from me :slight_smile:

Thank you so much for your help, I found the solution thanks to you !

I guess you see what is of all of these leading to haha


One thing to remember as you plan your next steps: consider how you will deal with the overlapping lines where family A overlaps family B.

Yep I did already :slight_smile:
I check all the lines are overlapping each other, and create only one wall and not two overlapping. This problem only concern lines for walls, not those for doors, ceiling and floors :slight_smile:

The only issue is that the script is not really stable… it crashes sometimes ( a lot… haha) and makes Revit crash. I need to solve that …

Towards that end… a file which reproduces the crash would help figure out ‘why’. My testing with that node wasn’t robust, but the company I built it for hasn’t had any issues, which indicates either something more complex in what you’re up to which I hadn’t taken into account, or something is causing the problem outside of the node itself.

From my tests it comes from this Python code. But I will try to figure that out. I keep you in touch with what I find

1 Like