Category vs BuiltInCategory?

Category vs BuiltInCategory?

george1985
Collaborator Collaborator
353 Views
3 Replies
Message 1 of 4

Category vs BuiltInCategory?

george1985
Collaborator
Collaborator

Dear Revit Experts,

Can someone please explain me the difference between a Autodesk.Revit.DB.Category, and Autodesk.Revit.DB.BuiltInCategory?


Thank you very much for the shared knowledge.

0 Likes
Accepted solutions (1)
354 Views
3 Replies
Replies (3)
Message 2 of 4

TripleM-Dev.net
Advisor
Advisor
Accepted solution

Category is a object/class (has methods and properties)

BuiltInCategory is just a Enum (static value), holds the internal id for the category it's representig.

 

And from each BuiltInCategory you can create a Category (except the invalid one), but not all Categories can be converted into a BuiltInCategory enum.

 

Something like that.....

Message 3 of 4

george1985
Collaborator
Collaborator

Thank you very much @TripleM-Dev.net for the detailed answer!
What confuses me, is that: in a way: Autodesk.Revit.DB.Category are also built in. For example, we have: Furniture, Generic Models, Railings and so on.
I can't change these Categories. They are Revit default Categories. So in a way, they are somehow builtin?

0 Likes
Message 4 of 4

TripleM-Dev.net
Advisor
Advisor

Those referencing the builtins, yes, If they have negative ID it's a builtin catagory so name etc can't be changed.

 

But a subcategory of those, is also a Category, those can be deleted/renamed, unless it's a builtin also (some are, like the hidden category in almost each top-level category)

 

If you need to know more see the Class info methods and properties, here a link to it's property BuiltinCategory in R2025: https://revapidocs.com/2025.htm?id=c3359fec-7b8d-d106-9380-3ba232ac4d14.htm