com.esri.arcgis.geodatabase
Interface INetElements

All Superinterfaces:
Serializable
All Known Implementing Classes:
INetElementsProxy, StreetNetwork, UtilityNetwork

public interface INetElements
extends Serializable

Provides access to members that convert between user IDs and network element IDs (EIDs).

Remarks

Each element in a logical network has a unique Element ID (EID). The EID can be accessed by providing the following three IDs: UserClassID, UserID, and UserSubID. If the network is part of a geometric network, the UserClassID and UserID correspond to the FeatureClassID and OID of the feature. The UserSubID is the ID of the subelement of the feature.

When To Use

Use the INetElements interface to convert between Element IDs (EIDs) and user-friendly IDs of individual elements in your network, or to check the validity of an EID.

Product Availability

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

See Also:
INetElementDescription, INetElementDescriptionEdit, INetElementClass, INetElements

Method Summary
 int getEID(int userClassID, int userID, int userSubID, int elementType)
          Returns the network element ID (EID).
 int getEIDCount(int userClassID, int userID, int elementType)
          Returns the number of network element IDs (EIDs) corresponding to the specified user class ID and user ID.
 IEnumNetEID getEIDs(int userClassID, int userID, int elementType)
          Returns the network element IDs (EIDs) corresponding to the specified user classID and user ID.
 boolean isValidElement(int eID, int elementType)
          Returns whether the specified element is part of the network.
 void queryIDs(int eID, int elementType, int[] userClassID, int[] userID, int[] userSubID)
          Returns the user class ID, user ID, and user sub ID for the specified network element.
 

Method Detail

isValidElement

boolean isValidElement(int eID,
                       int elementType)
                       throws IOException,
                              AutomationException
Returns whether the specified element is part of the network.

Remarks

The valid state of an element can be either true or false. A state of true means the element is part of the network while a state of false means it is not part of the network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
eID - The eID (in)
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
The validState
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEID

int getEID(int userClassID,
           int userID,
           int userSubID,
           int elementType)
           throws IOException,
                  AutomationException
Returns the network element ID (EID).

Remarks

Pass in a valid UserClassID, UserID, UserSubID, and esriElementType and the corresponding Element ID (EID) in the logical network is returned. If no network elements match the given UserClassID, UserID, UserSubID, and esriElementType, then 0 is returned.
If the network is part of a geometric network, the UserClassID and UserID correspond to the FeatureClassID and OID of the feature. The UserSubID is the ID of the subelement of the feature.
Entering a negative value for the UserSubID will return the first EID in the table that matches the specified UserClassID and UserID. This is not necessarily the lowest-valued EID matching the specified UserClassID and UserID, nor necessarily the EID corresponding to the lowest-valued SubID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
userClassID - The userClassID (in)
userID - The userID (in)
userSubID - The userSubID (in)
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
The eID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEIDCount

int getEIDCount(int userClassID,
                int userID,
                int elementType)
                throws IOException,
                       AutomationException
Returns the number of network element IDs (EIDs) corresponding to the specified user class ID and user ID.

Remarks

Pass in a valid UserClassID, UserID, and esriElementType and the number of corresponding Element IDs (EIDs) in the logical network is returned. If no network elements match the given UserClassID, UserID, and esriElementType, then 0 is returned.
If the network is part of a geometric network, then the UserClassID and UserID correspond to the FeatureClassID and OID of the feature. For complex edge and junction features, this method returns then number of corresponding Element IDs (EIDs) in the logical network. For simple edge and junction features, this method will return 1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
userClassID - The userClassID (in)
userID - The userID (in)
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
The eIDCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEIDs

IEnumNetEID getEIDs(int userClassID,
                    int userID,
                    int elementType)
                    throws IOException,
                           AutomationException
Returns the network element IDs (EIDs) corresponding to the specified user classID and user ID.

Remarks

Pass in a valid UserClassID, UserID, and esriElementType and an enumeration of the corresponding Element IDs (EIDs) in the logical network is returned. If no network elements match the given UserClassID, UserID, and esriElementType, then an empty enumeration of EIDs is returned.
If the network is part of a geometric network, then the UserClassID and UserID correspond to the FeatureClassID and OID of the feature. For complex edge and junction features, this method returns an enumeration of the corresponding Element IDs in the logical network. For simple edge and junction features, the enumeration will always contain only one Element ID (EID).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
userClassID - The userClassID (in)
userID - The userID (in)
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumNetEID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryIDs

void queryIDs(int eID,
              int elementType,
              int[] userClassID,
              int[] userID,
              int[] userSubID)
              throws IOException,
                     AutomationException
Returns the user class ID, user ID, and user sub ID for the specified network element.

Remarks

Pass an a valid Element ID (EID) and its esriElementType and the IDs of the corresponding feature in the geometric network are returned.
If the network is part of a geometric network, the UserClassID and UserID correspond to the FeatureClassID and OID of the feature. The UserSubID is the ID of the subelement of the feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
eID - The eID (in)
elementType - A com.esri.arcgis.geodatabase.esriElementType constant (in)
userClassID - The userClassID (out: use single element array)
userID - The userID (out: use single element array)
userSubID - The userSubID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.