Create Method


Creates a new topography surface element and adds it to the document.

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

Syntax

C#
public static TopographySurface Create(
	Document document,
	IList<XYZ> points
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	points As IList(Of XYZ) _
) As TopographySurface
Visual C++
public:
static TopographySurface^ Create(
	Document^ document, 
	IList<XYZ^>^ points
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document to be modified.
points
Type: System.Collections.Generic IList XYZ
A collection of points. The points represent an enclosed area in the XY plane. There can be only one point in the same XY location.

Return Value

The new topography surface.

Remarks

The document will be regenerated during the creation of this topography surface element.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException document is not a project document. -or- There are no points in the input points set. -or- There were not enough points to form a valid region (at least 3 are required), or the points were collinear ignoring elevation. -or- One or more points shared the same XY location (even with different elevations). This is not permitted for topography surfaces.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
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