Create Method (Document, ElementId, ElementId, ElementId, RailingPlacementPosition)


Creates new railings with the specified railing type on all sides of a stairs instance in a MultistoryStairs element.

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

Syntax

C#
public static ISet<ElementId> Create(
	Document document,
	ElementId multistoryStairsId,
	ElementId levelId,
	ElementId railingTypeId,
	RailingPlacementPosition placePosition
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	multistoryStairsId As ElementId, _
	levelId As ElementId, _
	railingTypeId As ElementId, _
	placePosition As RailingPlacementPosition _
) As ISet(Of ElementId)
Visual C++
public:
static ISet<ElementId^>^ Create(
	Document^ document, 
	ElementId^ multistoryStairsId, 
	ElementId^ levelId, 
	ElementId^ railingTypeId, 
	RailingPlacementPosition placePosition
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
multistoryStairsId
Type: Autodesk.Revit.DB ElementId
The id of the MultistoryStairs that contains the stairs which will be the host of this railing. The stairs should have no associated railings yet.
levelId
Type: Autodesk.Revit.DB ElementId
The level of stairs on which the new railing will be created. The level should be one of levels defining the MultistoryStairs element.
railingTypeId
Type: Autodesk.Revit.DB ElementId
The railing type of the new railing to be created.
placePosition
Type: Autodesk.Revit.DB.Architecture RailingPlacementPosition
The placement position of the new railing.

Return Value

The new railing instances successfully created on the stairs.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The railingTypeId is not a railing type. -or- The ElementId levelId is not a Level. -or- The levelId is not a level of MultistoryStairs stairs element.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.Exceptions InvalidOperationException The multistoryStairsId already has associated railings or is in editing mode so association of railings is not permitted.
Autodesk.Revit.Exceptions ModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document has no open transaction.

See Also