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


INATraversalResultQuery.SearchConnected Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (NetworkAnalyst)  

INATraversalResultQuery.SearchConnected Method

Returns a connected set of elements in the result.

[Visual Basic .NET]
Public Function SearchConnected ( _
    ByVal Element As INATraversalResultElement, _
    ByVal searchedElementType As esriNetworkElementType, _
    ByVal searchedDirection As esriRelDirection, _
    ByVal recycle As Boolean _
) As IFeatureCursor
[C#]
public IFeatureCursor SearchConnected (
    INATraversalResultElement Element,
    esriNetworkElementType searchedElementType,
    esriRelDirection searchedDirection,
    bool recycle
);
[C++]
HRESULT SearchConnected(
  INATraversalResultElement* Element,
  esriNetworkElementType searchedElementType,
  esriRelDirection searchedDirection,
  VARIANT_BOOL recycle,
  IFeatureCursor** connectedElements
);
[C++]

Parameters Element [in]
Element is a parameter of type INATraversalResultElement searchedElementType [in]
searchedElementType is a parameter of type esriNetworkElementType searchedDirection [in]
searchedDirection is a parameter of type esriRelDirection recycle [in] recycle is a parameter of type VARIANT_BOOL connectedElements [out, retval]
connectedElements is a parameter of type IFeatureCursor

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Remarks

The SearchConnected method returns the NATraversalResultElements that are connected to the input NATraversalResultElement.

The searchedElementType parameter allows you to specify if you want to find the connected junctions, edges, or turns.  The searchedDirection parameter specifies the direction.  For example, esriRelDirectionForward will constrain the returned elements to just be those that were reached in the traversal after the current element. 

The recycle parameter specifies that the same feature object should be used over and over with the underlying data just switched out.  Use this option if you don't need to keep references to multiple traversal elements at the same time.

See Also

INATraversalResultQuery Interface