The subtype field name.
[Visual Basic 6.0] Property SubtypeFieldName As String
[Visual Basic .NET] Public Property SubtypeFieldName As String
[C#] public string SubtypeFieldName {get; set;}
[C++] public: __property String* get_SubtypeFieldName(); public: __property void set_SubtypeFieldName(String* );
-2147220461 - FDO_E_SUBTYPE_CODE_HAS_ASSOCIATED_TOPOLOGY_RULE
Resetting the Subtype field which contains a subtype code that is associated with a topology rule will raise an error.
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:
Dim pFeatcls As IFeatureClass
Dim pFeatLayer As IFeatureLayer
Dim pDoc As IMxDocument
Dim pMap As IMap
Dim pSubtypes As ISubtypes
Set pDoc = ThisDocument
Set pMap = pDoc.Maps.Item(0)
Set pFeatLayer = pMap.Layer(0)
Set pFeatcls = pFeatLayer.FeatureClass
Set pSubtypes = pFeatcls
pSubtypes.SubtypeFieldName = "TYPECODE"
The Subtype field can be reset by assigning an empty string to SubtypeFieldName:
pSubtypes.SubtypeFieldName = ""