This document is archived and information here might be outdated.  Recommended version.


IEnumVertex Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IEnumVertex Interface

Provides access to members that iterate over the vertices or points of a geometry (see the EnumVertices property of the IPointCollection interface). Note: the IEnumVertex interface has been superseded byIEnumVertex2. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The methods on IEnumVertex interface can be used to access points of a point collection. EnumVertex is a lightweight object that you can use to pass around between routines. You may wish to use this enumerator in preference to the Points array returned by the IPointCollection::Points property, as it allows you to directly change the x-, y-, z-, m-, and ID properties of each Point, although Points cannot be removed or replaced using this interface. The IEnumVertex has knowledge of parts within multipart shapes and may therefore be convenient for use on a multipart shape, such as a Polygon or Polyline. Those methods are more efficient than the IPointCollection methods to access a large number of points in a sequential order for polyline and polygon. The collection methods transform absolute point index into a part relative index, enumerators don't.

Members

Description
Method Clone Returns a copy of this enumerator positioned at the same vertex.
Method IsLastInPart Indicates if the current vertex is last in the current part.
Method Next Returns the next vertex and its location within the geometry.
Method NextInPart Returns the next vertex in current part, or goes back to the first vertex in the part after last vertex in part is encountered.
Method Previous Returns the previous vertex and its location in the geometry.
Method put_ID Sets the ID attribute of the current vertex. For segment-based geometries, this will modify a pair of segments.
Method put_M Sets the M attribute of the current vertex. For segment-based geometries, this will modify a pair of segments.
Method put_X Sets the X coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.
Method put_Y Sets the Y coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.
Method put_Z Sets the Z coordinate of the current vertex. For segment-based geometries, this will modify a pair of segments.
Method QueryNext Copies the next vertex to the input parameter and returns its location in the geometry.
Method QueryNextInPart Copies the next vertex in the current part to the input parameter and returns its location in current part. Continues with the first vertex in the part if already at the end.
Method QueryPrevious Copies the previous vertex to the input parameter and returns its location in the geometry.
Method Reset Starts from the beginning of the geometry the next time Next is called.
Method ResetToEnd Starts from the end of the geometry the next time Previous is called.
Method SetAt Resets enumerator to specific location.
Method Skip Skips forward or backward over a specified number of vertices.