CreateReferenceElevation Method


Creates a reference elevation on the ElevationMarker at the desired index.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2013

Syntax

C#
public void CreateReferenceElevation(
	Document document,
	int index,
	ElementId viewIdToReference
)
Visual Basic
Public Sub CreateReferenceElevation ( _
	document As Document, _
	index As Integer, _
	viewIdToReference As ElementId _
)
Visual C++
public:
void CreateReferenceElevation(
	Document^ document, 
	int index, 
	ElementId^ viewIdToReference
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document to which the new reference elevation will be added.
index
Type: System Int32
The index on the ElevationMarker where the reference elevation will be placed.
viewIdToReference
Type: Autodesk.Revit.DB ElementId
The view which will be referenced.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The ElementId viewIdToReference does not correspond to a View. -or- This view cannot be referenced by elevations. -or- index is occupied or out of range. -or- Elevation view creation is not allowed in this family.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Only reference elevations can be hosted on this ElevationMarker.
Autodesk.Revit.Exceptions 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.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document has no open transaction.

See Also