ArcObjects Library Reference (GeoDatabase)  

ISubtypes.AddSubtype Method

Adds the subtype to the set of associated subtypes.

[Visual Basic .NET]
Public Sub AddSubtype ( _
    ByVal SubtypeCode As Integer, _
    ByVal SubtypeName As String _
)
[C#]
public void AddSubtype (
    int SubtypeCode,
    string SubtypeName
);
[C++]
HRESULT AddSubtype(
  long SubtypeCode,
  BSTR SubtypeName
);
[C++]

Parameters

SubtypeCode [in]   SubtypeCode is a parameter of type long SubtypeName [in]   SubtypeName is a parameter of type BSTR

Product Availability

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

Description

AddSubtype adds the subtype to the set of subtypes for the given object class with the subtype code and subtype name given.

Functional License Check

If your application/site is not appropriately licensed, AddSubtype can return an error of FDO_E_NO_SCHEMA_LICENSE.

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.

See Also

ISubtypes Interface

.NET Related Topics

Creating subtypes