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


IFeatureCursor Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFeatureCursor Interface
ArcGIS Developer Help

IFeatureCursor Interface

Provides access to members that hand out enumerated features, field collections and allows for the updating, deleting and inserting of features.

Product Availability

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

Members

Name Description
Method DeleteFeature Delete the existing Feature in the database corresponding to the current position of the cursor.
Read-only property Fields The fields Collection for this cursor.
Method FindField The index of the field with the specified name.
Method Flush Flush any outstanding buffered writes to the database.
Method InsertFeature Insert a new Feature into the database using the property values in the input buffer. The ID of the new Feature is returned.
Method NextFeature Advance the position of the cursor by one and return the Feature object at that position.
Method UpdateFeature Update the existing Feature in the database corresponding to the current position of the cursor.

Classes that implement IFeatureCursor

Classes Description
FeatureCursor Esri Feature Cursor object.
RelQueryCursor A cursor that is opened from a RelQueryTable.
TemporalCursor (esriTrackingAnalyst) Controls settings for the temporal cursor.

Remarks

The IFeatureCursor interface provides access to a set of features in a feature class. It operates in the same way as ICursor, although it does not inherit from that interface. This saves you from having to use Query-Interface when dealing with features rather than rows.

Feature cursors can be used as an input to IFeatureCursorBuffer, which lets you spatially buffer the features by a distance.

You can also draw the features from a cursor on the display. For more information, see the IFeatureRenderer::Draw method.

When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.

.NET Samples

Create camera flyby from path Closest facility solver Cut polygons without selection edit task Custom reshape polyline edit task Editing using a custom form Get and set key properties on a mosaic dataset Calculate area geoprocessing function tool Location-allocation solver Multivariate renderer Extending the replication synchronization process RSS weather GraphicTracker RSS weather layer RSS weather layer StreetMap routing Play back tracking data ViperPin tool