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

IClassSchemaEdit.RegisterAsObjectClass Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IC > IClassSchemaEdit Interface > IClassSchemaEdit.RegisterAsObjectClass Method
ArcGIS Developer Help

IClassSchemaEdit.RegisterAsObjectClass Method

Registers this class with the database, assigning it a class id and creating an object id column.

[Visual Basic .NET]
Public Function RegisterAsObjectClass ( _
    ByVal suggestedOIDFieldName As String, _
    ByVal ConfigKeyword As String _
) As Integer
public int RegisterAsObjectClass (
    string suggestedOIDFieldName,
    string ConfigKeyword
HRESULT RegisterAsObjectClass(
  BSTR suggestedOIDFieldName,
  BSTR ConfigKeyword
suggestedOIDFieldName [in]

suggestedOIDFieldName is a parameter of type BSTR ConfigKeyword [in]
ConfigKeyword is a parameter of type BSTR

Product Availability

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


The RegisterAsObjectClass method will register a table or feature class (ArcSDE layer) in the database with the Geodatabase. The act of registering the data as an object class will create records for the object class in the Geodatabase system tables and assign the object class a unique ID. Once a table or SDE layer is registered as an object class, it can participate in rules, topological relationships and relationships.

When registering a table or ArcSDE layer as an object class, an ObjectID field must be added to it. This field will contain the object IDs which uniquely identify each feature in the class. The object IDs for existing data will automatically be generated. Once a table or ArcSDE layer has been registered as an object class in the Geodatabase, it cannot be unregistered.

RegisterAsObjectClass takes two arguments: the name of the object ID field, and the ArcSDE configuration keyword to use for storage of the new data that is inserted into the object ID field. RegisterAsObjectClass returns a long which is the object class ID assigned to the newly registered class.

See Also

IClassSchemaEdit Interface | IObjectClass Interface | IFeatureClass Interface | IClass Interface