StairsRunType Class


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: 2015.0.0.0 (2015.0.0.0)
Since: 2013

Syntax

C#
public class StairsRunType : ElementType
Visual Basic
Public Class StairsRunType _
	Inherits ElementType
Visual C++
public ref class StairsRunType : public ElementType

Examples

Copy C#
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);
    }
}
Copy VB.NET
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

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →