Creates a new railing by specifying the railing path in the project document.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2017
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- curveLoop
- Type: Autodesk.Revit.DBCurveLoop
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
- Type: Autodesk.Revit.DBElementId
The railing type of the new railing to be created.
- baseLevelId
- Type: Autodesk.Revit.DBElementId
The base level on which the new railing will be created.
Return Value
The new railing instance if creation was successful, otherwise a null reference (Nothing in Visual Basic).Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | 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. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsModificationForbiddenException | 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.ExceptionsModificationOutsideTransactionException | The document has no open transaction. |