Provides access to members that return feature classes by name, ID and index.
| Description | ||
|---|---|---|
![]() |
Class | The FeatureClass associated with the specified index value. |
![]() |
ClassByID | The FeatureClass with the specified ID. |
![]() |
ClassByName | The FeatureClass with the specified name. |
![]() |
ClassCount | The number of FeatureClasses in this container. |
![]() |
Classes | An enumerator over the FeatureClasses. |
| CoClasses and Classes | Description |
|---|---|
| FeatureDataset | FeatureDataset Object. |
| GeometricNetwork | ESRI Geometric Network object. |
| NetworkDataset | A container for querying information about a network dataset. |
| Topology | ESRI Topology Object. |
The IFeatureClassContainer interface provides access to feature classes. For feature datasets, it can be seen as an alternative to the functionality available on other objects. Also, since IFeatureClassContainer is implemented by IGeometricNetwork and ITopology, it can be used to return the feature classes which participate in those types of datasets.
There is no guarentee on the order that the feature classes will be returned for IFeatureClassContainer::Classes.
Opening a feature class that participates in a topology or geometric network will also open all other feature classes participating in the topology or geometric network in memory.
The following code example demonstrates how to iterate over the collection of feature classes in a feature class container and how to open a specific feature class and return some information for it. Note that the dataset passed in must support the IFeatureClassContainer interface.
Public Sub GetFCFromFCC(pFCC As IFeatureClassContainer, strFC As String)
Dim pEnumFC As IEnumFeatureClass
Dim pFC As IFeatureClass
'Get the enumeration of feature classes
Set pEnumFC = pFCC.Classes
pEnumFC.Reset
'For each feature class, print some information.
Set pFC = pEnumFC.Next
Debug.Print "AliasName", "OCID"
Do Until pFC Is Nothing
Debug.Print pFC.AliasName, pFC.ObjectClassID
Set pFC = pEnumFC.Next
Loop
'For the feature class matching the supplied string, print out extra information
Set pFC = pFCC.ClassByName(strFC)
Debug.Print pFC.FeatureType, pFC.clsid
End Sub