RailingType Class

An object supporting management of baluster and post placement within the railing type.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: (
Since: 2013


public class RailingType : ElementType
Visual Basic
Public Class RailingType _
	Inherits ElementType
Visual C++
public ref class RailingType : public ElementType


Copy C#
private void GetRailingType(Stairs stairs)
    ICollection<ElementId> railingIds = stairs.GetAssociatedRailings();
    foreach (ElementId railingId in railingIds)
        Railing railing = stairs.Document.GetElement(railingId) as Railing;
        RailingType railingType = stairs.Document.GetElement(railing.GetTypeId()) as RailingType;

        // Format railing type info for display
        string info = "Railing Type:  " + railingType.Name;
        info += "\nPrimary Handrail Height:  " + railingType.PrimaryHandrailHeight;
        info += "\nTop Rail Height:  " + railingType.TopRailHeight;

        TaskDialog.Show("Revit", info);
Private Sub GetRailingType(stairs As Stairs)
    Dim railingIds As ICollection(Of ElementId) = stairs.GetAssociatedRailings()
    For Each railingId As ElementId In railingIds
        Dim railing As Railing = TryCast(stairs.Document.GetElement(railingId), Railing)
        Dim railingType As RailingType = TryCast(stairs.Document.GetElement(railing.GetTypeId()), RailingType)

        ' Format railing type info for display
        Dim info As String = "Railing Type:  " + railingType.Name
        info += vbLf & "Primary Handrail Height:  " + railingType.PrimaryHandrailHeight
        info += vbLf & "Top Rail Height:  " + railingType.TopRailHeight

        TaskDialog.Show("Revit", info)
End Sub

Inheritance Hierarchy

System Object
Autodesk.Revit.DB Element
Autodesk.Revit.DB ElementType
Autodesk.Revit.DB.Architecture RailingType

See Also