StairsGetStairsSupports Method |
Returns all the stairs support components in the stairs.
Namespace: Autodesk.Revit.DB.ArchitectureAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic ICollection<ElementId> GetStairsSupports()
Public Function GetStairsSupports As ICollection(Of ElementId)
public:
ICollection<ElementId^>^ GetStairsSupports()
member GetStairsSupports : unit -> ICollection<ElementId>
Return Value
ICollectionElementId
Exampleprivate 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
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also