Revit API

Revit API

Posts: 25
Registered: ‎04-18-2012
Message 1 of 3 (491 Views)

Fire rating (1Hr, 2Hr.... etc) values for walls.

491 Views, 2 Replies
03-06-2013 01:33 AM



I am looking for fire rating Value for Walls. i.e. 1Hr, 2 Hr etc.


I am able to see these values in "Wall-> Propertices-> Type Propertices" -> Identity data-> Fire Rating


But i want to get that value using .net  c# code.


Please tell me the method or any way so i get that value.


Please help!




Active Contributor
Posts: 39
Registered: ‎12-12-2012
Message 2 of 3 (474 Views)

Re: Fire rating (1Hr, 2Hr.... etc) values for walls.

03-06-2013 02:29 PM in reply to: nitin.k



You should install an addin called BipChecker, which can be found here


Use this add-in to determine whether the parameter you are trying to access is a Built In Parameter, or a Shared Parameter.  You can also determine whether the parameter is stored as a string, integer, double or ElementId.


You can also use RevitLookup, which is an add-in included with the Revit SDK.


Element wallElement; (I'm assuming you already have the element available in your code)

FamilyInstance wallFamilyInstance = wallElement as FamilyInstance;

if (wallFamilyInstance != null)


//Note that we are accessing wallFamilyInstance.Symbol to access the parameter - this is because it's a type parameter

//If the parameter is a built in parameter, use the following line
Parameter fireRatingParam = wallFamilyInstance.Symbol.get_Parameter(BuiltInParameter.OST_YOURPARAM);

//If the parameter is a shared parameter, use the following line
Parameter fireRatingParam = wallFamilyInstance.Symbol.get_Parameter("Shared Parameter Name");

//Assuming this parameter is an integer. If it's not, use the appropriate type function
int value = fireRatingParam.AsInteger();






ADN Support Specialist
Posts: 334
Registered: ‎03-05-2010
Message 3 of 3 (425 Views)

Re: Fire rating (1Hr, 2Hr.... etc) values for walls.

03-19-2013 08:24 AM in reply to: nitin.k


Hi Nitin,


The fire rating parameter of wall type is a built-in parameter.

So you can get the parameter value in the way of getting built-in parameter member.


Here is the code snippet to show the process.



public class RevitCommand1 : IExternalCommand
public Result Execute(ExternalCommandData commandData, ref string messages, ElementSet elements)

UIApplication app = commandData.Application;
Document doc = app.ActiveUIDocument.Document;

Selection sel = app.ActiveUIDocument.Selection;
Reference ref1 = sel.PickObject(ObjectType.Element, "Please pick a wall to get its fire rating");
Wall wall = doc.GetElement(ref1) as Wall;
if (wall == null)
return Result.Failed;

Parameter param = wall.WallType.get_Parameter(BuiltInParameter.DOOR_FIRE_RATING);

//show the fire rating in task dialog
TaskDialog.Show("Wall type fire rating", param.AsString());

return Result.Succeeded;


Joe Ye
Developer Technical Services
Autodesk Developer Network
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.