GetStairsRuns Method


Stairs Get Stairs Runs Method

Returns all the stairs run components in the stairs.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ICollection<ElementId> GetStairsRuns()

Return Value

ICollection ElementId
The stairs run components in the stairs.
Example
private void AddStartandEndRisers(Stairs stairs)
{
    ICollection<ElementId> runIds = stairs.GetStairsRuns();

    foreach (ElementId runId in runIds)
    {
        StairsRun run = stairs.Document.GetElement(runId) as StairsRun;
        if (null != run)
        {
            run.BeginsWithRiser = true;
            run.EndsWithRiser = true;
        }
    }
}
See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →