ChangePointElevation Method


Changes the elevation value for a point.

Namespace: Autodesk.Revit.DB.Architecture
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2014

Syntax

C#
public void ChangePointElevation(
	XYZ point,
	double elevationValue
)
Visual Basic
Public Sub ChangePointElevation ( _
	point As XYZ, _
	elevationValue As Double _
)
Visual C++
public:
void ChangePointElevation(
	XYZ^ point, 
	double elevationValue
)

Parameters

point
Type: Autodesk.Revit.DB XYZ
The point to be modified.
elevationValue
Type: System Double
The new elevation value.

Remarks

If the point doesn't exist in the current TopographySurface, an exception will be thrown. This applies to a TopographySurface element (not a SiteSubRegion or a topography surface associated with a BuildingPad), which should be in an active TopographyEditScope.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The input point does not exist in the current topography surface.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentOutOfRangeException The given value for elevationValue must be no more than 30000 feet in absolute value.
Autodesk.Revit.Exceptions InvalidOperationException This element is not a TopographySurface. -or- The points of this topography surface are not editable. -or- The TopographySurface element is not in an active TopographyEditScope. Modification cannot be made on this TopographySurface.
Autodesk.Revit.Exceptions ModificationForbiddenException The document containing this TopographySurface 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 containing this TopographySurface is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document containing this TopographySurface has no open transaction.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →