This document is archived and information here might be outdated.  Recommended version.


INetworkQuery.ElementsByOID Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IN > INetworkQuery Interface > INetworkQuery.ElementsByOID Property
ArcGIS Developer Help

INetworkQuery.ElementsByOID Property

Elements in the network dataset corresponding to the given source object.

[Visual Basic .NET]
Public Function get_ElementsByOID ( _
    ByVal SourceID As Integer, _
    ByVal OID As Integer _
) As IEnumNetworkElement
[C#]
public IEnumNetworkElement get_ElementsByOID (
    int SourceID,
    int OID
);
[C++]
HRESULT get_ElementsByOID(
  long SourceID,
  long OID,
  IEnumNetworkElement** Elements
);
[C++]
Parameters
SourceID [in]

SourceID is a parameter of type long OID [in]
OID is a parameter of type long Elements [out, retval]
Elements is a parameter of type IEnumNetworkElement**

Product Availability

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

Remarks

The SourceID parameter is the unique ID assigned to the NetworkSource in the network dataset.

The EnumNetworkElement enumeration object returned by the ElementsByOID property is recycling.  For enumerations with more than one network element returned, this means that the network element object returned by the first call to Next is expected to be reused in subsequent calls to Next.

For edge elements, the element(s) returned in the enumeration will be oriented in the esriNEDAlongDigitized Direction.  To get the edge element in the esriNEDAgainstDigitized Direction, call INetworkEdge::QueryEdgeInOtherDirection on the returned edge.

See Also

INetworkQuery Interface