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


INetworkQuery.ElementsForSource Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

INetworkQuery.ElementsForSource Property

Enumeration of all elements in the network dataset corresponding to the given source.

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

Parameters SourceID [in] SourceID 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 ElementsBySource 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