Show / Hide Table of Contents

Method InsertVertex

InsertVertex(MapPoint)

Creates a new vertex at the specified location and inserts it after the currently selected element, or appends the point if there is nothing selected.

Declaration
public void InsertVertex(MapPoint point)
Parameters
Type Name Description
MapPoint point

The location of the new vertex.

Remarks

If Geometry is empty (IsEmpty is true), the given point is added as the initial vertex, and then selected. If nothing is selected (SelectedElement is null), the point is appended to the end of the Geometry, and then selected. If SelectedElement is the first vertex in a part of a Multipart, the given point is inserted before the currently selected vertex, and then selected.

If point is z-aware (HasZ = true), this method will change the Geometry to be z-aware, if it is not already.

If Geometry is a non-empty Point, this method replaces the existing point with the given point and selects it.

If the SelectedElement is the StartPoint of a curve segment (IsCurve is true), the new vertex will be inserted after the selected element and the existing curve segment will be replaced by two line segments. Alternatively, if it is the first vertex in a part of a Multipart, the new vertex is inserted before the currently selected vertex.

Exceptions
Type Condition
InvalidOperationException

The GeometryEditor must be started in order to insert a vertex.

ArgumentException

Empty points cannot be used to insert vertices into the GeometryEditor geometry.

See Also
AllowVertexCreation

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.3 - 200.8
.NET200.3 - 300.0
.NET Windows200.3 - 300.0
.NET Android200.3 - 300.0
.NET iOS200.3 - 300.0
.NET Framework200.3 - 200.8
UWP200.3 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.