StairsLandingCreateSketchedLanding Method

Creates a customized landing between two runs by providing the closed boundary curves of the landing.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static StairsLanding CreateSketchedLanding(
	Document document,
	ElementId stairsId,
	CurveLoop curveLoop,
	double baseElevation
)

Parameters

document  Document
The document that owns the landing.
stairsId  ElementId
The stairs that the new sketched landing belongs to.
curveLoop  CurveLoop
The closed boundary curves of the new landing.
baseElevation  Double
Base elevation of the new stairs run. The elevation has following restriction:
  • The base elevation is relative to the base elevation of the stairs.
  • The base elevation will be rounded automatically to a multiple of the riser height.
  • The base elevation should be equal to or greater than half of the riser height.

Return Value

StairsLanding
The new sketched landing.
Exceptions
ExceptionCondition
ArgumentException The element stairsId does not exist in the document -or- The stairsId is not a valid stairs element. -or- The stairs stairsId has no valid landing type. -or- The curveLoop is not closed. -or- The input curveLoop contains at least one curve which is not a bound Line or bound Arc and is not supported for this operation. -or- Failed to create curve element by the curveLoop.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException The given value for baseElevation must be no more than 30000 feet in absolute value. -or- The baseElevation is less than half of the riser height of the stairs.
InvalidOperationException The stairs element represented by stairsId is not in an active StairsEditScope. New components cannot be added to it.
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.
RegenerationFailedException The curveLoop doesn't satisfy restrictions to generate sketched landing.
Remarks
The new stairs landing and the document will be regenerated. This should be run from within an open transaction.
See Also