Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get ForgeTypeId for Railing?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
npriceHT4SD
190 Views, 2 Replies

How to get ForgeTypeId for Railing?

I am working to generate a list of ForgeTypeIds for common geometric Category Types. I had previously created a list using the BuiltInCategory enum, but I am looking to support the new ForgeTypeId.

Following the documentation I see that there is a helper function already: Category.GetBuiltInCategoryTypeId(), however when I loop through the list of BuiltInCategories I have created, I get the following error in Revit:

 

The BuiltInCategory -2000175 is not valid.
Parameter name: categoryId

 

I know from peaking at the BuiltInCategory enum definition that this is the Railing category type. If I remove the Railing category, it doesn't complain anymore.

 

Is there a different method to get ForgeTypeIds for Built-in categories, and is there a better way to see all 'built-in' ForgeTypeIds?

Tags (2)
Labels (1)
2 REPLIES 2
Message 2 of 3
admaecc211151
in reply to: npriceHT4SD

Railing now is 

OST_StairsRailing = -2000126

 

A simple way to know the BuiltInCategory is install revit lookup for your Revit and check almost every information of elements by it.

And if you want to check by API, element.Category.Id will also return the BuiltInCategory ID.

Message 3 of 3
npriceHT4SD
in reply to: admaecc211151

Thanks! To be clear, is this the same for Rails not hosted in a Stair element? I will give RevitLookup a shot for getting more specific information I might be looking for around these elements.

Cheers!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community