Revit 2024 API |
Stairs..::..GetStairsRuns Method |
Stairs Class Example See Also |
Returns all the stairs run components in the stairs.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:
2013
Syntax
C# |
---|
public ICollection<ElementId> GetStairsRuns() |
Visual Basic |
---|
Public Function GetStairsRuns As ICollection(Of ElementId) |
Visual C++ |
---|
public: ICollection<ElementId^>^ GetStairsRuns() |
Return Value
The stairs run components in the stairs.Examples
CopyC#
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; } } }
CopyVB.NET
Private Sub AddStartandEndRisers(stairs As Stairs) Dim runIds As ICollection(Of ElementId) = stairs.GetStairsRuns() For Each runId As ElementId In runIds Dim run As StairsRun = TryCast(stairs.Document.GetElement(runId), StairsRun) If run IsNot Nothing Then run.BeginsWithRiser = True run.EndsWithRiser = True End If Next End Sub