RVTDocs.com

Railing.Create(Document, CurveLoop, ElementId, ElementId)

Method
Description:
Creates a new railing by specifying the railing path in the project document.
Syntax
public static Railing Create(
	Document document,
	CurveLoop curveLoop,
	ElementId railingTypeId,
	ElementId baseLevelId
)
Parameters
Parameter Type Description
document Document The document.
curveLoop CurveLoop The railing path along which the new railing will be created. The curveLoop should be continuous with curves which are only bounded lines and arcs on the same horizontal plane. It also has to have maximum two curves meet in one end point.
railingTypeId ElementId The railing type of the new railing to be created.
baseLevelId ElementId The base level on which the new railing will be created.
Return Value
Type Description
Railing The new railing instance if creation was successful, otherwise .
Exceptions
Exception Condition
ArgumentException The curveLoop must be a single connected path, located on the same horizontal plane and defined using lines or arcs only. It also has to have maximum two curves meet in one end point. -or- The railingTypeId is not a railing type. -or- The ElementId baseLevelId is not a Level.
ArgumentNullException A non-optional argument was null
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.