RVTDocs.com

StairsLanding.CreateAutomaticLanding

Method
Description:
Creates automatic landing(s) between two stairs runs.
Remarks:
This should be called within open stairs edit scope and transaction. The new stairs landing(s) and the document will be regenerated. The landing type of the new stairs landing(s) is determined by stairs type.
Syntax
public static IList<ElementId> CreateAutomaticLanding(
	Document document,
	ElementId firstRunId,
	ElementId secondRunId
)
Parameters
Parameter Type Description
document Document The document that owns the stairs runs and new landing(s).
firstRunId ElementId The first stairs run.
secondRunId ElementId The second stairs run.
Return Value
Type Description
IList The created landing(s) between the two stairs runs.
Exceptions
Exception Condition
ArgumentException The firstRunId is not a valid stairs run. -or- The secondRunId is not a valid stairs run. -or- The stairs runs firstRunId and secondRunId belong to different stairs host.
ArgumentNullException A non-optional argument was null
InvalidOperationException The stairs element to which the stairs component firstRunId belong is not in an active StairsEditScope. -or- Cannot create automatic landing(s) between stairs runs of firstRunId and secondRunId.
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 Failed to create automatic landing(s) due to document regeneration failures.