A stairs run type object that is used in the generation of stairs run.
Namespace:
Autodesk.Revit.DB.Architecture
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since:
2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Examples
Copy
C#
private void GetRunType(Stairs stairs)
{
ICollection<ElementId> runIds = stairs.GetStairsRuns();
ElementId firstRunId = runIds.First();
StairsRun firstRun = stairs.Document.GetElement(firstRunId) as StairsRun;
if (null != firstRun)
{
StairsRunType runType = stairs.Document.GetElement(firstRun.GetTypeId()) as StairsRunType;
// Format landing type info for display
string info = "Stairs Run Type: " + runType.Name;
info += "\nRiser Thickness: " + runType.RiserThickness;
info += "\nTread Thickness: " + runType.TreadThickness;
TaskDialog.Show("Revit", info);
}
}
Copy
VB.NET
Private Sub GetRunType(stairs As Stairs)
Dim runIds As ICollection(Of ElementId) = stairs.GetStairsRuns()
Dim firstRunId As ElementId = runIds.First()
Dim firstRun As StairsRun = TryCast(stairs.Document.GetElement(firstRunId), StairsRun)
If firstRun IsNot Nothing Then
Dim runType As StairsRunType = TryCast(stairs.Document.GetElement(firstRun.GetTypeId()), StairsRunType)
' Format landing type info for display
Dim info As String = "Stairs Run Type: " + runType.Name
info += vbLf & "Riser Thickness: " + runType.RiserThickness
info += vbLf & "Tread Thickness: " + runType.TreadThickness
TaskDialog.Show("Revit", info)
End If
End Sub
Inheritance Hierarchy
System
Object
Autodesk.Revit.DB Element
Autodesk.Revit.DB ElementType
Autodesk.Revit.DB.Architecture StairsRunType
Autodesk.Revit.DB Element
Autodesk.Revit.DB ElementType
Autodesk.Revit.DB.Architecture StairsRunType