A stairs run type object that is used in the generation of stairs run.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Examples

private void GetRunType(Stairs stairs)
{
ICollection<ElementId> runIds = stairs.GetStairsRuns();
ElementId firstRunId = runIds.First();
StairsRun firstRun = stairs.Document.GetElement(firstRunId) as StairsRun;
if (null != firstRun)
{
StairsRunType runType = stairs.Document.GetElement(firstRun.GetTypeId()) as StairsRunType;
// Format landing type info for display
string info = "Stairs Run Type: " + runType.Name;
info += "\nRiser Thickness: " + runType.RiserThickness;
info += "\nTread Thickness: " + runType.TreadThickness;
TaskDialog.Show("Revit", info);
}
}

Private Sub GetRunType(stairs As Stairs)
Dim runIds As ICollection(Of ElementId) = stairs.GetStairsRuns()
Dim firstRunId As ElementId = runIds.First()
Dim firstRun As StairsRun = TryCast(stairs.Document.GetElement(firstRunId), StairsRun)
If firstRun IsNot Nothing Then
Dim runType As StairsRunType = TryCast(stairs.Document.GetElement(firstRun.GetTypeId()), StairsRunType)
' Format landing type info for display
Dim info As String = "Stairs Run Type: " + runType.Name
info += vbLf & "Riser Thickness: " + runType.RiserThickness
info += vbLf & "Tread Thickness: " + runType.TreadThickness
TaskDialog.Show("Revit", info)
End If
End Sub
Inheritance Hierarchy
SystemObject
Autodesk.Revit.DBElement
Autodesk.Revit.DBElementType
Autodesk.Revit.DB.ArchitectureStairsRunType
Autodesk.Revit.DBElement
Autodesk.Revit.DBElementType
Autodesk.Revit.DB.ArchitectureStairsRunType