Railing.Create(Document, ElementId, ElementId, ElementId, RailingPlacementPosition)
Method
Description:
Creates new railings with the specified railing type on all sides of a stairs instance in a element.
Creates new railings with the specified railing type on all sides of a stairs instance in a element.
Syntax
Parameters
Parameter | Type | Description |
---|---|---|
document | Document | The document. |
multistoryStairsId | ElementId | The id of the <a href="8b07cbff-013c-889f-8807-703e63a91923.htm">MultistoryStairs</a> that contains the stairs which will be the host of this railing. The stairs should have no associated railings yet. |
levelId | ElementId | The level of stairs on which the new railing will be created. The level should be one of levels defining the <a href="8b07cbff-013c-889f-8807-703e63a91923.htm">MultistoryStairs</a> element. |
railingTypeId | ElementId | The railing type of the new railing to be created. |
placePosition | RailingPlacementPosition | The placement position of the new railing. |
Return Value
Type | Description |
---|---|
ISet | The new railing instances successfully created on the stairs. |
Exceptions
Exception | Condition |
---|---|
ArgumentException | The railingTypeId is not a railing type. -or- The ElementId levelId is not a Level. -or- The levelId is not a level ofMultistoryStairsstairs element. |
ArgumentNullException | A non-optional argument was null |
ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
InvalidOperationException | The multistoryStairsId already has associated railings or is in editing mode so association of railings is not permitted. |
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. |
ModificationOutsideTransactionException | The document has no open transaction. |