Create Method (Document, ElementId, LinkElementId, StairsNumberSystemReferenceOption, LinkElementId)


Creates a new instance of a NumberSystem associated to a host element, a view, and a reference level of stairs if in a multistory stairs.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.0)
Since: 2018

Syntax

C#
public static NumberSystem Create(
	Document document,
	ElementId viewId,
	LinkElementId hostElementId,
	StairsNumberSystemReferenceOption referenceOption,
	LinkElementId placementLevelId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	viewId As ElementId, _
	hostElementId As LinkElementId, _
	referenceOption As StairsNumberSystemReferenceOption, _
	placementLevelId As LinkElementId _
) As NumberSystem
Visual C++
public:
static NumberSystem^ Create(
	Document^ document, 
	ElementId^ viewId, 
	LinkElementId^ hostElementId, 
	StairsNumberSystemReferenceOption referenceOption, 
	LinkElementId^ placementLevelId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
viewId
Type: Autodesk.Revit.DB ElementId
The view in which the NumberSystem will be created.
hostElementId
Type: Autodesk.Revit.DB LinkElementId
The host id on which the NumberSystem will be created.
referenceOption
Type: Autodesk.Revit.DB.Architecture StairsNumberSystemReferenceOption
The reference option of the NumberSystem.
placementLevelId
Type: Autodesk.Revit.DB LinkElementId
The id of the level on which the NumberSystem will be placed. The placement level must be one of the base levels of a stairs group members. It is suggested to get the level from MultistoryStairs.GetStairsPlacementLevels().

Return Value

The created NumberSystem.

Remarks

In multistory stairs, a stairs element could be a stair group or individual stair. This method allows to add a NumberSystem for a run of an individual stairs or a stairs group member on the placementLevelId.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException viewId is not valid for placement of a NumberSystem (only floor plan views and elevation views are permitted). -or- hostElementId is not valid as a host for NumberSystem (only StairsRun elements are permitted in this release). -or- The reference option is not valid for a NumberSystem. -or- The placementLevelId is not one of the stairs base levels, or is higher than the elevation of viewId. -or- The hostElementId already has a number system.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →