Returns all the stairs support components in the stairs.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public ICollection<ElementId> GetStairsSupports()
Return Value
ICollection<ElementId>Example
C#
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); }
VB
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