Revit 2023 API |
Stairs..::..GetStairsSupports Method |
Stairs Class Example See Also |
Returns all the stairs support components in the stairs.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since:
2013
Syntax
Examples

private void GetStairSupports(Stairs stairs) { ICollection<ElementId> supportIds = stairs.GetStairsSupports(); string info = "Number of supports: " + supportIds.Count; int supportIndex = 0; foreach (ElementId supportId in supportIds) { supportIndex++; Element support = stairs.Document.GetElement(supportId); if (null != support) { info += "\nName of support " + supportIndex + ": " + support.Name; } } TaskDialog.Show("Revit", info); }

Private Sub GetStairSupports(stairs As Stairs) Dim supportIds As ICollection(Of ElementId) = stairs.GetStairsSupports() Dim info As String = "Number of supports: " & supportIds.Count Dim supportIndex As Integer = 0 For Each supportId As ElementId In supportIds supportIndex += 1 Dim support As Element = stairs.Document.GetElement(supportId) If support IsNot Nothing Then info += (vbLf & "Name of support " & supportIndex & ": ") + support.Name End If Next TaskDialog.Show("Revit", info) End Sub