Class XYEventSourceClass

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll
[Guid("4B194345-A3E3-11D4-9FF0-00C04F6BDF06")]
[ClassInterface(ClassInterfaceType.None)]
public class XYEventSourceClass : XYEventSource, IDataset, IObjectClassEvents_Event, IDatasetEdit, IDatasetEditInfo, ITable, ITableCapabilities, ISubtypes, IObjectClassInfo, IObjectClassInfo2, IFeatureClass, IObjectClass, IClass, IGeoDataset, IEventSource, IXYEventSource, IVirtualTable, IObjectClassSchemaEvents_Event
Inheritance
XYEventSourceClass
Implements
IObjectClassEvents_Event
IObjectClassSchemaEvents_Event
Inherited Members

Explicit Interface Implementations

AddField(IField)

Adds a field to this object class.

virtual void AddField(IField Field)

Parameters

Field IField

Remarks

Prior to adding a new field to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

Attempting to add a new field that does not allow null values will fail, if the class already has data in it. The only solution is to recreate the class with the non-nullable field, then copy the rows from the original class into the new class.

AddIndex(IIndex)

Adds an index to this object class.

virtual void AddIndex(IIndex Index)

Parameters

Index IIndex

Remarks

Prior to adding a new index to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

AddSubtype(int, string)

Adds the subtype to the set of associated subtypes.

virtual void AddSubtype(int SubtypeCode, string SubtypeName)

Parameters

SubtypeCode int
SubtypeName string

Remarks

AddSubtype will create a new subtype for the associated object class. This method requires a subtype code as a Long and a subtype name as a String. Before adding subtypes, use the ISubtypes::SubtypeFieldName property to set the subtypes field.

Once created, you can use the ISubtypes::DefaultValue property to set default values for this subtypes fields, and the ISubtypes::Domain property to assign domains to fields for the subtype.

AliasName

The alias name of the object class.

virtual string AliasName { get; }

Returns

string

Remarks

Object classes in a geodatabase can have between one and three names. The name of the object class, which is the same as the name of the table in the DBMS in which the objects in the object class are stored, the alias name which the user can set for display purposes in end user applications. The third name is the model name which is a tool for developers of custom objects to use to guarantee the names of objects independent of the true name or alias name.

The AliasName property returns the alias name for the object class. If the object class has no alias name, then AliasName will return the name of the object class (fully qualified if on ArcSDE). The alias name can be modified using the IClassSchemEdit interface.

AreaField

The geometry area field.

virtual IField AreaField { get; }

Returns

IField

Remarks

This read-only property returns the name of the field which records the area of each feature. Only feature classes that have a ShapeType of esriGeometryPolygon have an Area field.

A null pointer will be returned if:

  • the feature class does not have a shape type of esriGeometryPolygon
  • the underlying database does not maintain an area field
  • the feature class is a shapefile or CAD data 

     

BrowseName

The browse name of the dataset.

virtual string BrowseName { get; set; }

Returns

string

Remarks

BrowseName returns file names without their extension. For example, States.shp would appear as States.

CLSID

The GUID for the COM Class (CoClass) corresponding to instances of this object class.

virtual UID CLSID { get; }

Returns

UID

CanBypassEditSession()

Indicates if updates to objects can be safely made outside of an edit session.

virtual bool CanBypassEditSession()

Returns

bool

Remarks

CanBypassEditSession is a convenience method that returns True if the instances of this object class may be created or updated outside of a Geodatabase edit session (an edit session is started by using the StartEditing method on the IWorkspaceEdit or the StartMultiuserEditing method on the IMultiuserWorkspaceEdit interface).

If True , then applications may update the data in this object class using any of the data updating interfaces and methods described here without starting an edit session. In this case applications are responsible for starting host database transactions as appropriate and for discarding cached object states across transaction boundaries when running on an ArcSDE database.

If False, then applications should always make modifications to the data in this object class within an edit session for correct multi-user behavior and for correct management of database state internally cached by the Geodatabase for the objects in this object class.

This method returns False for network feature classes. By default, this method returns True for non-network custom object classes. The developer of a non-network custom object class can change this behavior by implementing this interface on the class extension associated with the class and returning true for the method.

CanBypassStoreMethod()

Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency.

virtual bool CanBypassStoreMethod()

Returns

bool

Remarks

CanBypassStoreMethod is a convenience method that returns True if the instances of this object class have no custom behavior associated with creating or updating objects and if the object class does not participate in composite relationship classes or in relationship classes that require object notification. A return value of True implies that insert cursors handed out by the geodatabase will internally bypass the CreateRow and Store mechanisms when creating objects. A return value of False indicates that insert cursors will not bypass custom Store or OnChanged behavior implemented by the custom row object for this class.

By default, this method returns False for custom object classes. The developer of a custom object class can change this behavior by implementing this interface on the class extension associated with the class and returning True for the method.

In addition, a developer can implement this interface on the class extension of a simple class and set this property to False . Doing this will ensure that when features in the class are inserted, updated or deleted by editor tools that use insert and update cursors, such as Planarize, Create Features and the Object Loader do not bypass Store or OnChanged behavior. By default, this property for a simple class is logically True, meaning these tools will not broacast Geodatabase events which in turn are not rebroadcast as editor events (for which a custom editor application may be listening). Set this to False for those classes for which you always want to have these events broadcast. Alternatively, this can be set globally for the entire edit session using the IWorkspaceEditControl interface.

CanCopy()

True if this dataset can be copied.

virtual bool CanCopy()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

The CanCopy method is supported by:

  • CAD Drawings
  • Coverages
  • DBase Tables
  • Info Tables
  • Raster Datasets
  • SDC datasets
  • SDC Network Datasets
  • Shapefiles
  • Shapefile Network Datasets

CanDelete()

True if this dataset can be deleted.

virtual bool CanDelete()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

CanEdit

True if the dataset supports edit sessions with the ability to discard edits on save.

virtual bool CanEdit { get; }

Returns

bool

Remarks

This property is to be used within an active edit session, results cannot be guaranteed if called on a dataset outside of an edit session.

CanRedo

True if the dataset supports edit sessions with the ability to redo undone operations.

virtual bool CanRedo { get; }

Returns

bool

CanRename()

True if this dataset can be renamed.

virtual bool CanRename()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

CanSelect

Indicates if the table supports selection.

virtual bool CanSelect { get; }

Returns

bool

Remarks

Use CanSelect to determine if you can open a selection set on the table. A situation where CanSelect will be False is a standalone database table without an OID column.

CanUndo

True if the dataset supports edit sessions with the ability to undo individual edit operations.

virtual bool CanUndo { get; }

Returns

bool

Category

The category of the dataset.

virtual string Category { get; }

Returns

string

Remarks

IDataset::Category returns a description of the category of the dataset.  The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog.  The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".

The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.

Copy(string, IWorkspace)

Copies this dataset to a new dataset with the specified name.

virtual IDataset Copy(string copyName, IWorkspace copyWorkspace)

Parameters

copyName string
copyWorkspace IWorkspace

Returns

IDataset

Remarks

IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.

CreateFeature()

Create a new feature, with a system assigned object ID and null property values.

virtual IFeature CreateFeature()

Returns

IFeature

Remarks

CreateFeature will create a new feature for the feature class. The new feature is by default assigned a unique object ID (OID). All other fields are initialized to null values if they can be made null and to built-in default values appropriate to the type of the field if they cannot be made null. Use the IFeature::Store method to actually store this new feature in the database. When working with a versioned feature class, CreateFeature should only be called within an edit session. You can start an edit session by calling IWorkspaceEdit::StartEditing. All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

After calling CreateFeature, the default subtype value is not automatically set nor are default values initialized. For features without a subtype that have defined default values, calling IRowSubtypes::InitDefaultValues will initialize the default values.  Use IRowSubtypes::SubtypeCode to set the subtype value for features with subtypes before calling IRowSubtypes::InitDefaultValues to initialize the default values for the particular subtype.

Calling the CreateFeature method on a feature class (via the IFeatureClass interface on the feature class) has the same effect as calling the CreateRow method on the FeatureClass (via the ITable interface on the feature class) except that the IFeatureClass methods return IFeature interfaces on the returned row object.

If multiple features with common attributes are being sequentially created, the CreateFeatureBuffer method, IFeatureCursor.InsertFeature method and IFeatureBuffer interface should be used for better performance.

The basic process to create a new feature is:

1) Create the feature
2) Create the geometry for the feature
3) Store the geometry in the feature
4) Store the feature


CreateFeatureBuffer()

Create a feature buffer that can be used with an insert cursor.

virtual IFeatureBuffer CreateFeatureBuffer()

Returns

IFeatureBuffer

Remarks

The CreateFeatureBuffer method creates a feature buffer and returns the IFeatureBuffer interface. This can be used to create new features in the feature class with an insert cursor. Like creating a feature with IFeatureClass::CreateFeature, the field values for the new feature must be initialized to some value before it can be stored in the database. All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Calling the CreateFeatureBuffer method in IFeatureClass has the same effect as calling the CreateRowBuffer interface in ITable except that the IFeatureClass methods return an IFeatureBuffer interface on the created row buffer.

CreateRow()

Creates a row in the database with a system assigned object ID and null property values.

virtual IRow CreateRow()

Returns

IRow

Remarks

The CreateRow method creates a new row in the underlying database with a system assigned object id value. A row object representing the created row is returned to the caller. The row object returned has the system assigned object ID as the value of the OIDField. All other fields are initialized to null values if they can be made null and to built-in default values appropriate to the type of the field if they cannot be made null.

The caller is responsible for setting the desired field values into the row and calling the Store method on the row. If the table represents an object class with subtypes, then it is the caller’s responsibility to set the default subtype code into the row and call the InitDefaultValues method on the row before storing, if that is the desired result. For tables without object behavior, insert cursors offer a more efficient way for inserting new rows.

CreateRowBuffer()

Creates a row buffer that can be used with an insert cursor.

virtual IRowBuffer CreateRowBuffer()

Returns

IRowBuffer

Remarks

The CreateRowBuffer method creates a new row buffer object in memory and returns it to the caller. No row is created in the database. The returned row buffer does not have an object ID value. The caller can set values into the row buffer and use it as an argument to the InsertRow method on an insert cursor; the latter is obtained by calling the Insert method on the Table.

DefaultSubtypeCode

The default subtype associated with the class.

virtual int DefaultSubtypeCode { get; set; }

Returns

int

Remarks

This property sets or returns the value of the default subtype code for the associated class.

DefaultValue[int, string]

The default value for the associated attribute.

virtual object DefaultValue[int SubtypeCode, string FieldName] { get; set; }

Parameters

SubtypeCode int
FieldName string

Returns

object

Remarks

This property return the default value for a particular field associated with a subtype. It requires the subtype code as a Long and the field name as a String . You can use the IField::Type property to determine the type of field that you are passing into the function so you will know what data type is being returned.

Delete()

Deletes this dataset.

virtual void Delete()

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

DeleteField(IField)

Deletes a field from this object class.

virtual void DeleteField(IField Field)

Parameters

Field IField

Remarks

DeleteField removes the specified field from a table, object class or feature class. Fields that are required by the Geodatabase and cannot be removed include:

  • OBJECTID field
  • SHAPE and shape dependent fields such as SHAPE_Length
  • Enabled, AncillaryRole and Weight field for network feature classes
  • Subtype fields. In order to delete a subtype field, it must first be removed as the subtype field, see the help on ISubtypes::SubtypeFieldName

Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

DeleteIndex(IIndex)

Deletes an index from this object class.

virtual void DeleteIndex(IIndex Index)

Parameters

Index IIndex

Remarks

Prior to deleting an index from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

DeleteSearchedRows(IQueryFilter)

Delete the Rows in the database selected by the specified query.

virtual void DeleteSearchedRows(IQueryFilter QueryFilter)

Parameters

QueryFilter IQueryFilter

DeleteSubtype(int)

Deletes the subtype from the set of associated subtypes.

virtual void DeleteSubtype(int SubtypeCode)

Parameters

SubtypeCode int

Remarks

DeleteSubtype will delete a subtype for the associated object class. Calling DeleteSubtype will also remove any reference to that subtype in the geodatabase.

Domain[int, string]

The domain given the subtype and field.

virtual IDomain Domain[int SubtypeCode, string FieldName] { get; set; }

Parameters

SubtypeCode int
FieldName string

Returns

IDomain

Remarks

This property returns or sets an IDomain object associated with a particular subtype code and field. The subtype code is required as a Long and field name as a String.

EXTCLSID

The GUID for the COM Class (CoClass) corresponding to the class extension for this object class.

virtual UID EXTCLSID { get; }

Returns

UID

EventProperties

Property object used to define the X, Y and Z location fields.

virtual IXYEventProperties EventProperties { get; }

Returns

IXYEventProperties

EventTable

Table used to initialize the XYEventSource.

virtual ITable EventTable { get; }

Returns

ITable

Extension

The extension for this object class.

virtual object Extension { get; }

Returns

object

ExtensionProperties

The extension properties for this object class.

virtual IPropertySet ExtensionProperties { get; }

Returns

IPropertySet

Extent

The extent of the GeoDataset.

virtual IEnvelope Extent { get; }

Returns

IEnvelope

Remarks

The IGeoDataset::Extent property returns an envelope representing the maximum extent of data which has been stored in the dataset.

Consider the following scenario. A new feature class has features added to it. The IGeoDataset::Extent is then requested and an envelope is returned. The extents of the envelope returned are represented by the red box in the image below.

The red box represents the IGeoDataset extent

If a portion of the features were then deleted and the extent is again requested an envelope with the exact same extents as during the first request would be returned (see image below). This is because the deletion of features does not shrink the extent. However all additions of features outside the red box would increase the envelope returned to encompass the newly added features.

The red box represents the IGeoDataset extent after some of the features have been deleted

If you would like to update the IGeoDataset::Extent property to reflect the current features in your dataset please see IFeatureClassManage::UpdateExtent (also see IFeatureClassLoad). In the image below the extent has been updated and a new envelope is being returned.

The red box represents the IGeoDataset extent after it has been updated

ESRI's GroupLayer implements this property differently from most other layer coclasses. When you instantiate a new GroupLayer, this property will return a valid envelope with zero height and width. With most other newly instantiated layers (for example FeatureLayer, RasterLayer, TinLayer), this property initally returns Nothing.

 

FeatureClassID

The unique ID for the Feature Class.

virtual int FeatureClassID { get; }

Returns

int

Remarks

This read-only property will return the unique identifier for this feature class. All feature classes inside Geodatabases have a unique ID. Coverage and Shapefile feature classes do not, so IFeatureClass::FeatureClassID will always return -1 for Coverage and Shapefile feature classes. Since IFeatureClass inherits from IObjectClass, you can also get the feature class ID from IObjectClass:: ObjectClassID.
 





FeatureCount(IQueryFilter)

The number of features selected by the specified query.

virtual long FeatureCount(IQueryFilter QueryFilter)

Parameters

QueryFilter IQueryFilter

Returns

long

Remarks

FeatureCount returns the number of features that satisfy some attribute and/or spatial query as specified by an IQueryFilter object. If Nothing is supplied for the IQueryFilter, then FeatureCount returns the total number of features in the feature class.


FeatureDataset

The feature dataset that contains the feature class.

virtual IFeatureDataset FeatureDataset { get; }

Returns

IFeatureDataset

Remarks

This read-only property returns the IFeatureDataset interface on the feature dataset that this feature class is a memeber of. If the feature class is a stand alone feature class (it does not have a feature dataset), then this function will return a null pointer. A coverage feature class will return the IFeatureDataset interface to the coverage itself. Shapefiles will always return a null pointer.

FeatureType

The type of features in this feature class.

virtual esriFeatureType FeatureType { get; }

Returns

esriFeatureType

Remarks

This read-only property returns the feature type for the feature class as an esriFeatureType value. This property can be used to determine if a feature class is of a particular type, in order for the feature class to added to a network or topology, or possibly to skip over the feature class in an enumerator.

Fields

The fields collection for this object class.

virtual IFields Fields { get; }

Returns

IFields

Remarks

<P>Each table in a database has an ordered collection of fields, there is always at least one field in a table. The ordered collection behaves like a list, so it is possible to access individual fields by a numbered position (or index) in the list.</P> <P>A <STRONG>Fields </STRONG>collection can also exist independently of a table, for example when creating an index on a table you will need to define which fields take part in the index. There are many interfaces which either require or return a <STRONG>Fields </STRONG>collection; these include <STRONG>IClass </STRONG>(therefore also <STRONG>IObjectClass </STRONG>and <STRONG>IFeatureClass</STRONG>), <STRONG>ICursor</STRONG>, <STRONG>IIndex</STRONG>, <STRONG>IFeatureClassDraw</STRONG>, <STRONG>IRowBuffer</STRONG>, <STRONG>ISimpleDataConverter</STRONG>, <STRONG>ITableSort </STRONG>and <STRONG>IValidate</STRONG>.</P>

FindField(string)

The index of the field with the specified name.

virtual int FindField(string Name)

Parameters

Name string

Returns

int

Remarks

If FindField returns -1, the Field could not be found in the Fields collection.

Developers working with SDE should be aware of qualified field names and their impact on calls to FindField. For more information, see the IFields2 interface.

FullName

The associated name object.

virtual IName FullName { get; }

Returns

IName

Remarks

The FullName property returns a Name object for the dataset. The Name object can be persisted and provides a way to get back to the dataset in a future session of the application, via the Open method on the Name object.

GetFeature(long)

Get the feature with the specified object ID.

virtual IFeature GetFeature(long OID)

Parameters

OID long

Returns

IFeature

Remarks

GetFeature will return a feature from the feature class with the parameter-specified Object ID (OID). This method is typically used to find a particular feature with a known Object ID.  A cursor should be used to iterate through all features in a feature class.

Calling the GetFeature method on a feature class (via the IFeatureClass interface on the feature class) has the same effect as calling the GetRow method on the feature class (via the ITable interface) except that the return value is an IFeature reference, rather than IRow.

GetFeatures(object, bool)

Get a cursor of Rows given a set of object ids.

virtual IFeatureCursor GetFeatures(object fids, bool Recycling)

Parameters

fids object
Recycling bool

Returns

IFeatureCursor

Remarks

GetFeatures will return an IFeatureCursor which contains the features from the feature class with the parameter-specified Object IDs (OID). This method can be used to loop through a particular set of features with known Object IDs.

Calling the GetFeatures method from the IFeatureClass interface has the same effect as calling the GetRows method from the ITable interface except that the return value is an IFeatureCursor reference, rather than an ICursor reference.

The fids parameter should be provided with an integer array. If the array contains an invalid Object ID, no error will occur, and no feature will be retrieved for the value.

This method should not be called from .NET or Java applications. Instead, call IGeoDatabaseBridge.GetFeatures.

GetRow(long)

The row from the database with the specified object ID.

virtual IRow GetRow(long OID)

Parameters

OID long

Returns

IRow

Remarks

The GetRow method returns an existing row object, given its object ID value. The caller can query the returned row object for additional object specific interfaces. The retrieved row may be modified; calling Store on the row object after changing it will trigger messages to related objects and will mark the row for committing to the database.

GetRows(object, bool)

The cursor of rows based on a set of object ids.

virtual ICursor GetRows(object oids, bool Recycling)

Parameters

oids object
Recycling bool

Returns

ICursor

Remarks

The GetRows method returns a cursor that may be used to retrieve a set of rows specified by the input array of object id values. See the description of the Search method to understand the meaning of the recycling parameter. It is far more efficient to retrieve a set of rows using the GetRows method than it is to retrieve each individual row using the GetRow method. The retrieved rows may be modified; Store should be called on the row objects after changing them.

The oids parameter should be passed an integer array. For example:

 

[C#]

// Get a recycling cursor for the OID array.

int[] oidArray = new int[] { 10844, 10853, 10871 };

ICursor cursor = table.GetRows(oidArray, true);

HasOID

Indicates if the class has an object identity (OID) field.

virtual bool HasOID { get; }

Returns

bool

HasSubtype

Indicates if the table has subtypes.

virtual bool HasSubtype { get; }

Returns

bool

Remarks

This property returns a boolean value indicating if the object class has subtypes defined. If there are no subtypes defined, it returns FALSE , if there are subypes defined it returns TRUE.

IFeatureClass_AddField(IField)

virtual void IFeatureClass_AddField(IField Field)

Parameters

Field IField

IFeatureClass_AddIndex(IIndex)

virtual void IFeatureClass_AddIndex(IIndex Index)

Parameters

Index IIndex

IFeatureClass_AliasName

virtual string IFeatureClass_AliasName { get; }

Returns

string

IFeatureClass_CLSID

virtual UID IFeatureClass_CLSID { get; }

Returns

UID

IFeatureClass_DeleteField(IField)

virtual void IFeatureClass_DeleteField(IField Field)

Parameters

Field IField

IFeatureClass_DeleteIndex(IIndex)

virtual void IFeatureClass_DeleteIndex(IIndex Index)

Parameters

Index IIndex

IFeatureClass_EXTCLSID

virtual UID IFeatureClass_EXTCLSID { get; }

Returns

UID

IFeatureClass_Extension

virtual object IFeatureClass_Extension { get; }

Returns

object

IFeatureClass_ExtensionProperties

virtual IPropertySet IFeatureClass_ExtensionProperties { get; }

Returns

IPropertySet

IFeatureClass_Fields

virtual IFields IFeatureClass_Fields { get; }

Returns

IFields

IFeatureClass_FindField(string)

virtual int IFeatureClass_FindField(string Name)

Parameters

Name string

Returns

int

IFeatureClass_HasOID

virtual bool IFeatureClass_HasOID { get; }

Returns

bool

IFeatureClass_Indexes

virtual IIndexes IFeatureClass_Indexes { get; }

Returns

IIndexes

IFeatureClass_Insert(bool)

Returns a cursor that can be used to insert new features.

virtual IFeatureCursor IFeatureClass_Insert(bool useBuffering)

Parameters

useBuffering bool

Returns

IFeatureCursor

Remarks

Insert creates an insert cursor on the feature class which can be used to insert new features into it.

Insert cursors can be used on instances of feature subclasses (such as network features) with guaranteed polymorphic behavior. Insert cursors can be used either inside or outside of an edit session. If used inside an edit session, the changes are not committed to the base table until the edit session is saved. Network feature classes, Topology feature classes, feature classes that participate in composite relationships or other relationships with messaging may only be updated within an edit session. If you attempt to use an insert cursor on one of these classes outside of an edit session, it will fail. In addition, inserts of features that participate in a Topology or Geometric Network must be bracketed within an edit operation.

If the insert cursor is created outside of an edit operation and new features are inserted within an edit operation, the changes are commited to the base tables.  The additions to the base table cannot be undone.  For this reason, insert cursors should typically be scoped to edit operations.

When using an insert cursor with simple features, IFeature.Store will not be called when a feature is inserted. If a class extension, editor extension or other custom implementation relies on the messages propagated from the Store method, this could cause a problem. The IObjectClassInfo interface can be implemented by a class extension to force a Store call when an insert cursor is used. Alternately, requiring Store calls can be specified across a workspace by setting the IWorkspaceEditControl.SetStoreEventsRequired property to true.

If the insert cursor is used to insert complex features (such as network features), the cursor will revert to using IFeature.Store.

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.

IFeatureClass_OIDFieldName

virtual string IFeatureClass_OIDFieldName { get; }

Returns

string

IFeatureClass_ObjectClassID

virtual int IFeatureClass_ObjectClassID { get; }

Returns

int

IFeatureClass_RelationshipClasses[esriRelRole]

virtual IEnumRelationshipClass IFeatureClass_RelationshipClasses[esriRelRole Role] { get; }

Parameters

Role esriRelRole

Returns

IEnumRelationshipClass

IFeatureClass_Search(IQueryFilter, bool)

Returns an object cursor that can be used to fetch feature objects selected by the specified query.

virtual IFeatureCursor IFeatureClass_Search(IQueryFilter filter, bool Recycling)

Parameters

filter IQueryFilter
Recycling bool

Returns

IFeatureCursor

Remarks

Search will return an IFeatureCursor with all of the features that satisfy the attribute and/or spatial constraints as specified by an IQueryFilter reference. If a null value is passed to the filter parameter, the feature cursor will return all of the features from the feature class.

The recycling parameter controls row object allocation behavior. Recycling cursors rehydrate a single feature object on each fetch and can be used to optimize read-only access, for example, when drawing. It is illegal to maintain a reference on a feature object returned by a recycling cursor across multiple calls to NextFeature on the cursor. Features returned by a recycling cursor should not be modified. Non-recycling cursors return a separate feature object on each fetch. The features returned by a non-recycling cursor may be modified and stored with polymorphic behavior.

The Geodatabase guarantees "unique instance semantics" on non-recycling feature objects fetched during an edit session. In other words, if the feature retrieved by a search cursor has already been instantiated and is being referenced by the calling application, then a reference to the existing feature object is returned.

Non-recycling feature cursors returned from the Search method *MUST* be used when copying features from the cursor into an insert cursor of another class.  This is because a recycling cursor reuses the same geometry and under some circumstances all of the features inserted into the insert cursor may have the same geometry.  Using a non-recycling cursor ensures that each geometry is unique.

 

Existing rows can be edited with either a search cursor or an update cursor. When using a search cursor, NextRow is called, returning a reference to a row. The row is edited, and IRow.Store is called. When using an update cursor, NextRow is called, the row is edited, and ICursor.UpdateRow is called with the row as a parameter. It is important to remember, when using an update cursor, do not call the Store method.

In the same way, rows can be deleted using a search cursor or an update cursor, with IRow.Delete used instead of IRow.Store, and ICursor.DeleteRow used instead of ICursor.UpdateRow.
The recommended approach depends on whether or not the edits are being made in an edit session, if the cursor is being used by ArcMap or by an Engine application, and if the features being edited are simple or complex. The table below shows which approach to use in different situations:
 
ArcMap
Engine - Simple
Engine - Complex
Inside edit sessions
Search Cursor
Search Cursor
Search Cursor
Outside edit sessions
Search Cursor
Update Cursor
Search Cursor
A search cursor is always recommended in ArcMap, because the query may be satisfied by the contents of the map cache, making a DBMS query unnecessary.
When working with simple features and edit sessions in an Engine application, it's recommended that a search cursor be used to take advantage of batched updates in edit operations. With complex features, on the other hand, update calls are overridden by the features' custom behavior, meaning that the feature's store method will be called even if an update cursor is used.

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.

IFeatureClass_Select(IQueryFilter, esriSelectionType, esriSelectionOption, IWorkspace)

Returns a selection That contains the object ids selected by the specified query.

virtual ISelectionSet IFeatureClass_Select(IQueryFilter QueryFilter, esriSelectionType selType, esriSelectionOption selOption, IWorkspace selectionContainer)

Parameters

QueryFilter IQueryFilter
selType esriSelectionType
selOption esriSelectionOption
selectionContainer IWorkspace

Returns

ISelectionSet

Remarks

Select will return an ISelectionSet with all of the features that satisfy some attribute and/or spatial query as specified by an IQueryFilter object. If Nothing is given as the IQueryFilter, then the selection will have all of the features from the feature class.

Calling the Select method in IFeatureClass has the same effect as calling the corresponding method in ITable.

The selType parameter determines the type of selection set that will be created: an ID set, a snapshot, or a hybrid. See the ISelectionSet interface for a comparison of the three types.

When calling Select the selectionContainer parameter is no longer required. A null value should be passed as this parameter. 

IFeatureClass_Update(IQueryFilter, bool)

Returns a cursor that can be used to update features selected by the specified query.

virtual IFeatureCursor IFeatureClass_Update(IQueryFilter filter, bool Recycling)

Parameters

filter IQueryFilter
Recycling bool

Returns

IFeatureCursor

Remarks

Update opens an update cursor on the features specified by an attribute and/or spatial query as specified by the filter parameter. If a number of features selected by a particular query are to be updated and each feature is to be updated to a separate value then the update cursor is faster than doing an individual feature level update for each feature. The update is performed on the current 'cursor position'.

Update cursors can be used on instances of Feature subclasses (such as network features), with guaranteed polymorphic behavior. Update cursors can be used either inside or outside of an edit session. If used inside an edit session, the changes are not committed to the base table until the edit session is saved. Network feature classes, Topology feature classes, feature classes that participate in composite relationships or other relationships with messaging may only be updated within an edit session. If you attempt to use an update cursor on one of these classes outside of an edit session, it will fail.  In addition, edits to features that participate in a Topology or Geometric Network must be bracketed within an edit operation.

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.

IObjectClassInfo2_CanBypassStoreMethod()

Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency.

virtual bool IObjectClassInfo2_CanBypassStoreMethod()

Returns

bool

Remarks

CanBypassStore is a convenience method that returns True if the instances of this object class have no custom behavior associated with creating or updating objects and if the object class does not participate in composite relationship classes or in relationship classes that require object notification. A return value of True implies that insert cursors handed out by the geodatabase will internally bypass the CreateRow and Store mechanisms when creating objects. A return value of False indicates that insert cursors will not bypass custom Store or OnChanged behavior implemented by the custom row object for this class.

By default, this method returns False for custom object classes. The developer of a custom object class can change this behavior by implementing this interface on the class extension associated with the class and returning True for the method.

In addition, a developer can implement this interface on the class extension of a simple class and set this property to False . Doing this will ensure that when features in the class are inserted, updated or deleted by editor tools that use insert and update cursors, such as Planarize, Create Features and the Object Loader do not bypass Store or OnChanged behavior. By default, this property for a simple class is logically True, meaning these tools will not broacast Geodatabase events which in turn are not rebroadcast as editor events (for which a custom editor application may be listening). Set this to False for those classes for which you always want to have these events broadcast. Alternatively, this can be set globally for the entire edit session using the IWorkspaceEditControl interface.

IObjectClass_AddField(IField)

virtual void IObjectClass_AddField(IField Field)

Parameters

Field IField

IObjectClass_AddIndex(IIndex)

virtual void IObjectClass_AddIndex(IIndex Index)

Parameters

Index IIndex

IObjectClass_CLSID

virtual UID IObjectClass_CLSID { get; }

Returns

UID

IObjectClass_DeleteField(IField)

virtual void IObjectClass_DeleteField(IField Field)

Parameters

Field IField

IObjectClass_DeleteIndex(IIndex)

virtual void IObjectClass_DeleteIndex(IIndex Index)

Parameters

Index IIndex

IObjectClass_EXTCLSID

virtual UID IObjectClass_EXTCLSID { get; }

Returns

UID

IObjectClass_Extension

virtual object IObjectClass_Extension { get; }

Returns

object

IObjectClass_ExtensionProperties

virtual IPropertySet IObjectClass_ExtensionProperties { get; }

Returns

IPropertySet

IObjectClass_Fields

virtual IFields IObjectClass_Fields { get; }

Returns

IFields

IObjectClass_FindField(string)

virtual int IObjectClass_FindField(string Name)

Parameters

Name string

Returns

int

IObjectClass_HasOID

virtual bool IObjectClass_HasOID { get; }

Returns

bool

IObjectClass_Indexes

virtual IIndexes IObjectClass_Indexes { get; }

Returns

IIndexes

IObjectClass_OIDFieldName

virtual string IObjectClass_OIDFieldName { get; }

Returns

string

ITable_AddField(IField)

virtual void ITable_AddField(IField Field)

Parameters

Field IField

ITable_AddIndex(IIndex)

virtual void ITable_AddIndex(IIndex Index)

Parameters

Index IIndex

ITable_CLSID

virtual UID ITable_CLSID { get; }

Returns

UID

ITable_DeleteField(IField)

virtual void ITable_DeleteField(IField Field)

Parameters

Field IField

ITable_DeleteIndex(IIndex)

virtual void ITable_DeleteIndex(IIndex Index)

Parameters

Index IIndex

ITable_EXTCLSID

virtual UID ITable_EXTCLSID { get; }

Returns

UID

ITable_Extension

virtual object ITable_Extension { get; }

Returns

object

ITable_ExtensionProperties

virtual IPropertySet ITable_ExtensionProperties { get; }

Returns

IPropertySet

ITable_Fields

virtual IFields ITable_Fields { get; }

Returns

IFields

ITable_FindField(string)

virtual int ITable_FindField(string Name)

Parameters

Name string

Returns

int

ITable_HasOID

virtual bool ITable_HasOID { get; }

Returns

bool

ITable_Indexes

virtual IIndexes ITable_Indexes { get; }

Returns

IIndexes

ITable_OIDFieldName

virtual string ITable_OIDFieldName { get; }

Returns

string

Indexes

The indexes collection for this object class.

virtual IIndexes Indexes { get; }

Returns

IIndexes

Remarks

<P>The <STRONG>Indexes </STRONG>object represents a collection of indexes on a table. Indexes are designed to improve access times to data. The <STRONG>Indexes </STRONG>collection object operates in a very similar way to the Fields collection object.</P>

Insert(bool)

Returns a cursor that can be used to insert new Rows.

virtual ICursor Insert(bool useBuffering)

Parameters

useBuffering bool

Returns

ICursor

Remarks

The Insert method returns an insert cursor that can be used to bulk insert rows. It offers significantly faster performance than multiple calls to CreateRow and Store for tables storing simple rows and simple features (that is, for tables whose CLSID is esriGeoDatabase.Row, esriGeoDatabase.Object, or esriGeoDatabase.Feature).

Insert cursors on tables containing complex objects use the CreateRow and Store methods to achieve polymorphism, and there is no difference in performance in these cases.

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.

IsBeingEdited()

True if the dataset is being edited.

virtual bool IsBeingEdited()

Returns

bool

Remarks

Once an edit session has been started on a workspace, the IsBeingEdited method on the IDatasetEdit interface can be used to determine if a particular dataset is participating in the edit session.

The reasons why a dataset may not participate include the connected user has no privileges or permission to edit the dataset, the connected user is not licensed to edit this type of dataset, or the dataset is not versioned but a versioned edit session has been started (or vice versa).

LengthField

The geometry length field.

virtual IField LengthField { get; }

Returns

IField

Remarks

This read-only property returns the name of the field which records the length of each feature. Only feature classes that have a ShapeType of esriGeometryPolygon or esriGeometryPolyLine have a Length field. For Line features, this field records the length of the polyline. For polygon features, this field records the perimeter of the polygon.

A null pointer will be returned if:

  • the feature class does not have a shape type of esriGeometryPolygon or esriGeometryPolyLine
  • the underlying database does not maintain an area field
  • the feature class is a shapefile or CAD data

Name

The name of the Dataset.

virtual string Name { get; }

Returns

string

OIDFieldName

The name of the field corresponding to the OID.

virtual string OIDFieldName { get; }

Returns

string

ObjectClassID

The unique ID for the object class.

virtual int ObjectClassID { get; }

Returns

int

Remarks

Each feature class or table registered with the geodatabase is an object class. Object classes have a unique ID which distinguishes them from other object classes in the geodatabase. The ObjectClassID property returns this ID as a long. The object class ID is assigned by the system when the class is created, or registered with the geodatabase, it cannot be modified.

Those feature classes and tables that are in the database, but not registered with the geodatabase will always have an object class ID of -1.

OnAddField

virtual event IObjectClassSchemaEvents_OnAddFieldEventHandler OnAddField

Returns

IObjectClassSchemaEvents_OnAddFieldEventHandler

OnBehaviorChanged

virtual event IObjectClassSchemaEvents_OnBehaviorChangedEventHandler OnBehaviorChanged

Returns

IObjectClassSchemaEvents_OnBehaviorChangedEventHandler

OnChange

virtual event IObjectClassEvents_OnChangeEventHandler OnChange

Returns

IObjectClassEvents_OnChangeEventHandler

OnCreate

virtual event IObjectClassEvents_OnCreateEventHandler OnCreate

Returns

IObjectClassEvents_OnCreateEventHandler

OnDelete

virtual event IObjectClassEvents_OnDeleteEventHandler OnDelete

Returns

IObjectClassEvents_OnDeleteEventHandler

OnDeleteField

virtual event IObjectClassSchemaEvents_OnDeleteFieldEventHandler OnDeleteField

Returns

IObjectClassSchemaEvents_OnDeleteFieldEventHandler

PropertySet

The set of properties for the dataset.

virtual IPropertySet PropertySet { get; }

Returns

IPropertySet

Remarks

Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.

IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.

RefreshExtent()

Resets the extent of the XYEventSource layer.

virtual void RefreshExtent()

RelationshipClasses[esriRelRole]

The relationship classes in which this object class participates in for the specified role.

virtual IEnumRelationshipClass RelationshipClasses[esriRelRole Role] { get; }

Parameters

Role esriRelRole

Returns

IEnumRelationshipClass

Remarks

Object classes in a geodatabase may participate in any number of relationships classes. The RelationshipClasses property allows you to get a list of those relationship classes that the object class participates in by what role it plays (origin, destination, or either) defined by the esriRelRole enumeration used when you call this property. This property returns a IEnumRelationshipClass interface which you can use to loop through those relationship classes that are returned.

Rename(string)

Renames this Dataset.

virtual void Rename(string Name)

Parameters

Name string

Remarks

IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network.  In addition, certain feature classes, such as network feature classes, cannot be renamed.

RowCount(IQueryFilter)

The number of Rows selected by the specified query.

virtual long RowCount(IQueryFilter QueryFilter)

Parameters

QueryFilter IQueryFilter

Returns

long

Search(IQueryFilter, bool)

An object cursor that can be used to fetch row objects selected by the specified query.

virtual ICursor Search(IQueryFilter QueryFilter, bool Recycling)

Parameters

QueryFilter IQueryFilter
Recycling bool

Returns

ICursor

Remarks

The Search method returns a search cursor that can be used to retrieve rows specified by a query filter. The recycling parameter controls row object allocation behavior. Recycling cursors rehydrate a single row object on each fetch and can be used to optimize read-only access, for example, when drawing. It is illegal to maintain a reference on a row object returned by a recycling cursor across multiple calls to NextRow on the cursor.

Row objects returned by a recycling cursor should not be modified. Non-recycling cursors return a separate row object on each fetch. The objects returned by a non-recycling cursor may be modified and stored with polymorphic behavior. The geodatabase guarantees ‘unique instance semantics’ on non-recycling row objects fetched during an edit session. If the row object to be retrieved by a call to search has already been instantiated and is being referenced by the calling application, then a reference to the existing row object is returned.

Non-recycling feature cursors returned from the Search method *MUST* be used when copying features from the cursor into an insert cursor of another class.  This is because a recycling cursor reuses the same geometry and under some circumstances all of the features inserted into the insert cursor may have the same geometry.  Using a non-recycling cursor ensures that each geometry is unique.

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.

Select(IQueryFilter, esriSelectionType, esriSelectionOption, IWorkspace)

A selection that contains the object ids selected by the specified query.

virtual ISelectionSet Select(IQueryFilter QueryFilter, esriSelectionType selType, esriSelectionOption selOption, IWorkspace selectionContainer)

Parameters

QueryFilter IQueryFilter
selType esriSelectionType
selOption esriSelectionOption
selectionContainer IWorkspace

Returns

ISelectionSet

Remarks

The Select method returns a selection set that holds either row IDs or row objects from the Table depending on the selection option. Multiple selection sets can be created on the same table. It is up to a client application or object to keep a reference on created selections and use them as appropriate. For example, a FeatureLayer creates and uses selections on a FeatureClass (a type of Table).

The selType parameter determines the type of selection set that will be created: an ID set, a snapshot, or a hybrid. See the ISelectionSet interface for a comparison of the three types.

When calling Select the selectionContainer parameter is no longer required. A null value should be passed as this parameter. 

ShapeFieldName

The name of the default sShape field.

virtual string ShapeFieldName { get; }

Returns

string

Remarks

This read-only property returns the name of the geometry field for the feature class.

ShapeType

The type of the default Shape for the features in this feature class.

virtual esriGeometryType ShapeType { get; }

Returns

esriGeometryType

Remarks

This read-only property returns the shape type for the feature class. This shape type can be one of the following esriGeometryType.

SpatialReference

The spatial reference of the GeoDataset.

virtual ISpatialReference SpatialReference { get; }

Returns

ISpatialReference

Remarks

This property is read only. For layers, when the first layer is added to ArcMap, its spatial reference is read by this property, and the map is set to this spatial reference.

Instances of the esriCarto.GroupLayer class will return null for this property, as a group layer can contain multiple datasets with different spatial references.

Modifications to a spatial reference returned by this property will not be persisted. To modify the spatial reference of a dataset, the IGeoDatasetSchemaEdit and IGeoDatasetSchemaEdit2 interfaces should be used.

Subsets

Datasets contained within this dataset.

virtual IEnumDataset Subsets { get; }

Returns

IEnumDataset

Remarks

IDataset::Subsets is not supported for Graph objects such as a Geometric Network.  To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.

SubtypeFieldIndex

The subtype field index.

virtual int SubtypeFieldIndex { get; }

Returns

int

Remarks

This property returns the index of the field in the object class which stores the subtype codes. The field index is returned as a Long.

SubtypeFieldName

The subtype field name.

virtual string SubtypeFieldName { get; set; }

Returns

string

Remarks

The SubtypeFieldName property is used to either set or return string value for the field that contains the subtypes for this object class. To assign the subtype field, set SubtypeFieldName equal to the name of the field:

SubtypeName[int]

The subtype name.

virtual string SubtypeName[int SubtypeCode] { get; }

Parameters

SubtypeCode int

Returns

string

Remarks

This property returns the name of a subtype for a given subtype code for the associated object class. The subtype code is required as a Long and returns the name of the subtype as a String.

Subtypes

The subtypes associated with the class.

virtual IEnumSubtype Subtypes { get; }

Returns

IEnumSubtype

Remarks

Every ObjectClass has a default subtype code. If the user has not explicitly specified a default subtype or a subtype field, then DefaultSubtypeCode will return a subtype code of zero. Additionally, you can query the HasSubtype property; a value of False indicates an absence of a default subtype code, True indicates the presence of a default subtype code.

If the client instead asks for the enumeration of subtypes associated with an ObjectClass and no subtype has been previously added to the ObjectClass, then the enumerator will contain a single entry with a code of zero. The subtype field index value will be –1 if a default subtype has not been previously specified. Subtypes may only be short or long integers (esriFieldTypeSmallInteger or esriFieldTypeInteger). When setting the default subtype code, if one already exists, then it will be deleted. A subtype field must have been specified prior to setting the subtype code value.

Every type of field, except for esriFieldTypeShape, may have a default value. When setting the default value (which my be assigned on a subtype basis), it will be checked against the field’s associated Domain (if one exists) for validity.

This property returns all of the subtypes for the associated object class. Subtypes returns an IEnumSubtype enumeration which you can loop through to get all of the subtypes.

Type

The type of the Dataset.

virtual esriDatasetType Type { get; }

Returns

esriDatasetType

Remarks

The Type property returns the an esriDatasetType value indicating the dataset type, such as esriDTTable or esriDTFeatureClass.

Update(IQueryFilter, bool)

Returns a cursor that can be used to update Rows selected by the specified query.

virtual ICursor Update(IQueryFilter QueryFilter, bool Recycling)

Parameters

QueryFilter IQueryFilter
Recycling bool

Returns

ICursor

Remarks

The Update method returns an update cursor that can be used to update or delete rows. It offers somewhat faster performance than multiple calls to Store or Delete on row objects fetched using a non-recycling search cursor for tables storing simple rows and simple features. There is no difference in performance for complex objects and features.

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.

UpdateSearchedRows(IQueryFilter, IRowBuffer)

Update the Rows in the database selected by the specified query.

virtual void UpdateSearchedRows(IQueryFilter QueryFilter, IRowBuffer buffer)

Parameters

QueryFilter IQueryFilter
buffer IRowBuffer

Workspace

The workspace containing this dataset.

virtual IWorkspace Workspace { get; }

Returns

IWorkspace

Remarks

<p>A Workspace is a container of spatial and non-spatial datasets such as feature classes, raster datasets, and tables. It provides methods to instantiate existing datasets and to create new datasets. Workspaces are classified into types specified by the <b><a href="esriWorkspaceType.htm">esriWorkspaceType</a></b> enumerator: FileSystemWorkspace, LocalDatabaseWorkspace, and RemoteDatabaseWorkspace. Shapefiles and ArcGIS for Desktop Advanced workspaces are examples of FileSystemWorkspace. A personal geodatabase stored in an Access or a File Geodatabase is an example of a LocalDatabaseWorkspace. A geodatabase stored in an RDBMS such as Oracle, DB2, SQL Server, or Informix and accessed via ArcSDE is an example of a RemoteDatabaseWorkspace.</p> <p>A Workspace hands out a <b><a href="WorkspaceName.htm">WorkspaceName</a> </b>object as the value of its FullName property. For example, the WorkspaceName for a workspace can be persisted in a map document. An application can call the <b>Open()</b> method on the workspace name after loading it from persistent storage to connect to and get an object reference to the workspace.</p>