What Revit categories used have 3D geometry in a revit file?

Hello,

I am trying to know what Revit categories being used in a Revit project file have 3D geometry.

I want to know if there is a quick method to get a list of categories used avoiding to get all instance elements and ask which category they are and what geometry they got because the list to process could be massive more than an a million items and geometry operations taking ages with Dynamo.

I tried to use element bounding boxes and get parameter of category to query but the process is madness.

I was thinking maybe could be quicker to get the family types geometry and category attributes with Dynamo and ask which family types are used or have an instance in a project, but I got lost. wondering if there are any quicker tasks in the Revit API or a better workaraound.

Thanks

I don’t know of a “direct” way to do this. You also have to consider what you mean by “3D geometry” and where that geometry needs to be visible. You could have 2D geometry in a 3D space, but you could also have 3D geometries that are never actually visible within a project view. Do those count or do they not?

only 3d, size x,y,z >0, with volume or surfaces

With volume and surface:

New 3D view, all categories visible, i mean all
All Elements in View node
Query for Categories
Write to Excel
Question yourself: Did i miss anything.
close

OR
Copy some data from this file:

2 Likes

Does the geometry have to be visible though? What if you have placeholder elements with visible geometry toggled off in all views? The element/family has 3D geometry but it’s not shown in any view. What about temporary geometry like massing or voids or reference geometry?

If you none of those scenarios matter then you could try something like @Marcel_Rijsmus suggested. Otherwise you have to start by determining what geometry is and isn’t acceptable.

good questions, I want to know if the elements contain 3D geometry: mesh, surface, solid, 3d line, wether it is visible or not, because if they contain, I want to know the Revit category.

First attempt was getting the elements parameter value of Volume but it does work only with Solids geometry, so not useful.

My successful trial is getting all elements of all categories, getting the bounding box of all of elements, filter the elements with bounding box sizes>0, query all elements filtered, and get the category parameter, but this process is a bomb that consumes 90% of my memory RAM and minutes running so I am looking other approach much quicker, for example I saw there is a node in Orchid that extracts the model categories used in the project quite quickly so I guess would be similar result, but it is not necessarily.

I was thinking maybe other possibility would be query all family types of the project file and see if they are activated (used), if so, see if contains 3D geometry and get the category.

I did not try the suggestion of getting all elements visible in a 3D view of @Marcel_Rijsmus but I though the process is longer than get all elements of category node

That may be true @ruben.romero
But once you have a complete list in excel, the proces is much quicker and reusable

I want to know if it is possible to get what categories are used without query all elements basically, thinking to write python code that query what family types are active and if so, get the family category, but not necessarily the family contains a 3d geometry, but sure there are less items to query than all instance elements in a project file, so maybe there is a workaround in between.

But I am wondering if it is possible to know if element type has instance without getting the instance elements, just answer yes/no

Filtered element collectors are the most linear method. There is a collector argument for visible in view which can be passed to the first argument to look at elements in view versus the entire document. Assuming you don’t use 2.5d families anything in a 3d view should contain geometry if you hide annotation categories in that view.

Reference thread: Collect Elements in View using Python

1 Like

I would try to avoid any view because probably a 3d view with all the categories visible, does not exist in the project file to query, and I in this case I cannot edit the Revit project files to add views. I tried adding a temporary dynamo 3d view with geniusloci or clockwork node but not all categories are visible by default, for example Mass

My last trial is this: