Creates a straight run in the project document.
Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- stairsId
- Type: Autodesk.Revit.DBElementId
The stairs that the new stairs run will belong to.
- locationPath
- Type: Autodesk.Revit.DBLine
The line for location path of the new stairs run. The line has following restriction:- The line should be bound line which is parallel to the XY plane.
- The Z coordinate of the line is the base elevation for the new run (in model coordinates). It must be greater than or equal to the stairs base elevation.
- The number of created risers will be calculated by rounding the length of the location path to a multiple of the tread depth.
- justification
- Type: Autodesk.Revit.DB.ArchitectureStairsRunJustification
The location path justification of the new stairs run.
Return Value
The new stairs run.Remarks
The new stairs run and the document will be regenerated. This should be run from within an open transaction.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The stairsId is not a valid stairs element. -or- The input locationPath is not a bound line. -or- The input locationPath is not a valid location path line for straight run. -or- The locationPath is not valid line used as stairs path(probably it's too short). |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
Autodesk.Revit.ExceptionsInvalidOperationException | The stairs element represented by stairsId is not in an active StairsEditScope. New components cannot be added to it. |
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. |
Autodesk.Revit.ExceptionsRegenerationFailedException | The locationPath doesn't satisfy restrictions to generate straight run. |