Provides access to members that return information about geometric networks, field weighting and ancillary roles.
Use the INetworkClass interface to get a reference to the geometric network which the network class (feature class) belongs to. You can also check to see if the network class has an Ancillary Role in the network, and the right to field mapping for the logical network.
The INetworkClass interface inherits from the IFeatureClass interface and the ITable interface.
| Description | ||
|---|---|---|
![]() |
AddField | Adds a field to this object class. |
![]() |
AddIndex | Adds an index to this object class. |
![]() |
AliasName | The alias name of the object class. |
![]() |
AreaField | The geometry area field. |
![]() |
CLSID | The GUID for the COM Class (CoClass) corresponding to instances of this object class. |
![]() |
CreateFeature | Create a new feature, with a system assigned object ID and null property values. |
![]() |
CreateFeatureBuffer | Create a feature buffer that can be used with an insert cursor. |
![]() |
DeleteField | Deletes a field from this object class. |
![]() |
DeleteIndex | Deletes an index from this object class. |
![]() |
EXTCLSID | The GUID for the COM Class (CoClass) corresponding to the class extension for this object class. |
![]() |
Extension | The extension for this object class. |
![]() |
ExtensionProperties | The extension properties for this object class. |
![]() |
FeatureClassID | The unique ID for the Feature Class. |
![]() |
FeatureCount | The number of features selected by the specified query. |
![]() |
FeatureDataset | The feature dataset that contains the feature class. |
![]() |
FeatureType | The type of features in this feature class. |
![]() |
Fields | The fields collection for this object class. |
![]() |
FieldToWeightMapping | The specified field to Weight mapping for the logical network. |
![]() |
FindField | The index of the field with the specified name. |
![]() |
GeometricNetwork | The geometric network in which this class participates. |
![]() |
GetFeature | Get the feature with the specified object ID. |
![]() |
GetFeatures | Get a cursor of Rows given a set of object ids. |
![]() |
HasOID | Indicates if the class has an object identity (OID) field. |
![]() |
Indexes | The indexes collection for this object class. |
![]() |
Insert | Returns a cursor that can be used to insert new features. |
![]() |
LengthField | The geometry length field. |
![]() |
NetworkAncillaryRole | The possible network ancillary roles of the contained Features. |
![]() |
ObjectClassID | The unique ID for the object class. |
![]() |
OIDFieldName | The name of the field corresponding to the OID. |
![]() |
RelationshipClasses | The relationship classes in which this object class participates in for the specified role. |
![]() |
Search | Returns an object cursor that can be used to fetch feature objects selected by the specified query. |
![]() |
Select | Returns a selection That contains the object ids selected by the specified query. |
![]() |
ShapeFieldName | The name of the default sShape field. |
![]() |
ShapeType | The type of the default Shape for the features in this feature class. |
![]() |
Update | Returns a cursor that can be used to update features selected by the specified query. |
| Interfaces | Description |
|---|---|
| IFeatureClass | Provides access to members that control the behavior and properties of a feature class. |
| IObjectClass | Provides access to members that return information about an object class. |
| IClass | Provides access to members that return information about and manage the class. |
| CoClasses and Classes | Description |
|---|---|
| FeatureClass | FeatureClass Object. |
The FeatureType property of such feature classes will be one of esriFTSimpleJunction, esriDTSimpleEdge, esriFTComplexJunction, or esriFTComplexEdge.
You can QI (Query Interface) to any of these other interfaces on the FeatureClass object.
IDataset
IGeoDataset
ITable
INetworkClass
ISubtypes
IValidation
The following example shows how to get a reference to an INetworkClass interface.
public void esriGeoDatabase__INetworkClass(IWorkspace workspace, string networkclassName)
{
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
INetworkClass networkClass = (INetworkClass)featureWorkspace.OpenFeatureClass(networkclassName);
}
The following two examples are code excerpts that show how to get a reference to an INetworkClass interface with Visual Basic for Applications and Visual Basic respectivly.
When using VBA, you can use the table of contents in ArcMap to get at the network featureclass.
Dim pFeatcls As IFeatureClass
Dim pNetClass As INetworkClass
Dim pFeatLayer As IFeatureLayer
Dim pDoc As IMxDocument
Dim pMap As IMap
Set pDoc = ThisDocument
Set pMap = pDoc.Maps.Item(0)
Set pFeatLayer = pMap.Layer(0)
Set pFeatcls = pFeatLayer.FeatureClass
Set pNetClass = pFeatcls
Or you can use IMap::Layers to return an enumeration of layers corresponding to the network feature classes.
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pEnumLayer As IEnumLayer
Dim pLayer As ILayer
Dim pFLayer As IFeatureLayer
Dim pFC as IFeatureClass
Dim pId As New UID
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
'The GUID for Network Classes
pId = "{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}"
Set pEnumLayer = pMap.Layers(pId, False)
Set pFLayer = pLayer
Set pFC = pFLayer.FeatureClass
With Visual Basic, you are working outside of the application, so you need to use code to get the workspace object that contains the network feature class, then get the network feature class from there. This example has the location of the Access workspace hard-coded, but you could use the mini-browser to browse to the workspace, or the network feature class.
Dim pFact As IWorkspaceFactory
Set pFact = New AccessWorkspaceFactory
Dim pWorkspace As IWorkspace
Set pWorkspace = pFact.OpenFromFile("C:\data\electric.mdb", 0)
Dim pFeatws As IFeatureWorkspace
Set pFeatws = pWorkspace
Dim pFeatcls As IFeatureClass
Dim pNetClass As INetworkClass
Set pFeatcls = pFeatws.OpenFeatureClass("primaries")
Set pNetClass = pFeatcls
IFeatureClass Interface | IGeometricNetwork Interface