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


IEnumVertex.QueryNextInPart Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IE > IEnumVertex Interface > IEnumVertex.QueryNextInPart Method
ArcGIS Developer Help

IEnumVertex.QueryNextInPart Method

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.

[Visual Basic .NET]
Public Sub QueryNextInPart ( _
    ByVal vertex As IPoint, _
    ByRef OutVertexIndex As Integer _
)
[C#]
public void QueryNextInPart (
    IPoint vertex,
    ref int OutVertexIndex
);
[C++]
HRESULT QueryNextInPart(
  IPoint* vertex,
  System.Int32* OutVertexIndex
);
[C++]
Parameters
vertex 

vertex is a parameter of type IPoint* OutVertexIndex [out]
OutVertexIndex is a parameter of type long*

Product Availability

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

Description

The QueryNextInPart method returns the Next vertex in the current part only. If the Enumerator reaches the end of the current part it is reset to the start point of that part and returns the first point. As oppose to the NextInPart method the output point needs to be cocreated before to call QueryNextInPart. The QueryNextInPart method is faster than the NextInPart method because it doesn't need to create a point internally each time. The QueryNextInPart method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryNextInPart method will be faster than calling NextInPart each time.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

See Also

IEnumVertex Interface