Get lines by subcategory in a project

@Jonathan.Olesen
Here you are

Maybe it helps you :slight_smile:
This is exactly my situation.
I want to get this lines into Dynamo, but need them sorted by Subcategory
Get lines sorted via Subcategories.dyn (12.7 KB)
Get lines sorted via Subcategories.rvt (3.2 MB)

Just to be sure, this is the info you’re after right? “Sorting” your lines in the family by the subcategory set?

Or is it the 3 lines within the family?

The cube is just to represent anything of the family. Its not important. Important are the lines:
and if you look in the family they have subcategories:


When you pressed all the lines at the same time the subcategorie got empty cause I made different onces :smile:

To later be able to divide them.

Yea I got that :wink:

I’ll have a crack at it, but I think you issue is that you in fact want to work with the family itself not the “element” as the only curves you get in .dyn is dynamo geometry which do not hold any information about anything but geometry. :slight_smile:

But when I am able to get into .dyn the Geometry. Why cant I also get in the “information” of the geometry? Like in this case the Subcategory?

Because the geometry is just that… A vector…

From families I can also get in the Geometry +parameters

Hmm…

But whats then the information of the Subcategory?

What you’re getting from the element.geometry+ is just that. Geometry

The subcategory corresponds to the geometry, and fact is that the only “geometry” in your family is not the “lines” but rather the solid…

But as the information you’re looking for is not available in the “element” but rather in the “family” this is where you should in fact look.

1 Like

If you’re working within the family itself it becomes doable:

Okay this answers make it a bit clearer.
Thank you for your help!
It seems I need to do a bigger work around…

Hate to open up an old topic, but this came up last week so I wrote up a proof of concept showing how to group curve geometry from a family instance by the associated line style. There are some weaknesses in the methods used, but it’s working well so far and I thought it could be a good example of showing how to move between documents and data sets within a Dynamo for Revit Python environment.

The package is up on the Dynamo package manager in a package called GroupFamilyInstanceCurvesByLineStyle

2 Likes

Hi Jacob,
Inspiring work!
I’m wondering if your python could be adapted to allow access to subcategory information for geometry in curtain panel and window families for example. That would open up some huge doors, IMO.
Thank you.

Yes - I believe that it could. Not something I have a request for from one of my accounts, and I’m a bit overbooked at the moment. Feel free to pull open the python up and have a go at it. :slight_smile: