GetStairsLandings Method


Stairs Get Stairs Landings Method

Returns all the stairs landing 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> GetStairsLandings()

Return Value

ICollection ElementId
The stairs landing components in the stairs.
Example
private void GetStairLandings(Stairs stairs)
{
    ICollection<ElementId> landingIds = stairs.GetStairsLandings();
    string info = "Number of landings:  " + landingIds.Count;

    int landingIndex = 0;
    foreach (ElementId landingId in landingIds)
    {
        landingIndex++;
        StairsLanding landing = stairs.Document.GetElement(landingId) as StairsLanding;
        if (null != landing)
        {
            info += "\nThickness of Landing " + landingIndex + ":  " + landing.Thickness;
        }
    }

    TaskDialog.Show("Revit", info);
}
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 →