Provides access to members that hand out enumerated features, field collections and allows for the updating, deleting and inserting of features.
| Description | ||
|---|---|---|
![]() |
DeleteFeature | Delete the existing Feature in the database corresponding to the current position of the cursor. |
![]() |
Fields | The fields Collection for this cursor. |
![]() |
FindField | The index of the field with the specified name. |
![]() |
Flush | Flush any outstanding buffered writes to the database. |
![]() |
InsertFeature | Insert a new Feature into the database using the property values in the input buffer. The ID of the new Feature is returned. |
![]() |
NextFeature | Advance the position of the cursor by one and return the Feature object at that position. |
![]() |
UpdateFeature | Update the existing Feature in the database corresponding to the current position of the cursor. |
| CoClasses and Classes | Description |
|---|---|
| FeatureCursor | ESRI Feature Cursor object. |
| RelQueryCursor | A cursor that is opened from a RelQueryTable. |
| TemporalCursor (esriTrackingAnalyst) | Controls settings for the temporal cursor. |
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.
This example returns the average population of the selected features in a counties feature layer; it illustrates a transition from using ArcMap objects to using the geodatabase data-access objects.
Dim pFeatureSelection As IFeatureSelection
Set pFeatureSelection = pFeatureLayer
Dim pSelectionSet As ISelectionSet
Set pSelectionSet = pFeatureSelection.SelectionSet
Dim pFeatureCursor As IFeatureCursor
pSelectionSet.Search Nothing, True, pFeatureCursor
Dim pDataStats As IDataStatistics
Set pDataStats = New DataStatistics
Set pDataStats.Cursor = pFeatureCursor
pDataStats.Field = "POP1990"
MsgBox pDataStats.Statistics.Mean