Show / Hide Table of Contents

Method SelectPart

SelectPart(long)

Selects the part with the specified index.

Declaration
public void SelectPart(long partIndex)
Parameters
Type Name Description
long partIndex

The index of the part in the geometry editor's Multipart geometry to be selected. Use a value of 0 for Multipoint geometries.

Remarks

When a part of a polygon or polyline geometry is selected, a GeometryEditorPart is returned from SelectedElement. If the polygon or polyline has only one ReadOnlyPart, then a GeometryEditorGeometry with a shape equivalent to the entire geometry is returned from SelectedElement instead, which provides immediate access to the extent (Extent) and can be directly used in other geometry operations. If the current Geometry is a Point or Multipoint, the entire geometry is selected.

When a part of a Polygon or Polyline (Multipart) geometry is selected it can be edited separately from the other parts of the geometry. For example, you can move only the selected part interactively by dragging, or call MoveSelectedElement(MapPoint) or MoveSelectedElement(double, double) to move only the selected part programmatically.

Exceptions
Type Condition
InvalidOperationException

The GeometryEditor must be started in order to select a part. -OR- The current GeometryType does not represent a Multipart geometry and therefore cannot be selected.

ArgumentOutOfRangeException

The given index must be within range for the current Geometry.

See Also
AllowPartSelection
ClearSelection()
SelectVertex(long, long)
SelectMidVertex(long, long)
SelectGeometry()

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.