GetSubelementOnLevel Method


Gets the subelement on given level.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2018

Syntax

C#
public Subelement GetSubelementOnLevel(
	ElementId levelId
)
Visual Basic
Public Function GetSubelementOnLevel ( _
	levelId As ElementId _
) As Subelement
Visual C++
public:
Subelement^ GetSubelementOnLevel(
	ElementId^ levelId
)

Parameters

levelId
Type: Autodesk.Revit.DB ElementId
The id of the level the railing subelement is placed on.

Return Value

The subelement in given level. a null reference ( Nothing in Visual Basic) will be returned if railing has no subelements on given level.

Remarks

The method is valid only for railings hosted by stairs in MultistoryStairs . Input level should be a level of the railing stairs. See getStairsPlacementLevels method of MultistoryStairs .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException The railing is not hosted by stairs in MultistoryStairs .

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →