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
public IFeatureCursor SearchConnected (
    INATraversalResultElement Element,
    esriNetworkElementType searchedElementType,
    esriRelDirection searchedDirection,
    bool recycle
HRESULT SearchConnected(
  INATraversalResultElement* Element,
  esriNetworkElementType searchedElementType,
  esriRelDirection searchedDirection,
  VARIANT_BOOL recycle,
  IFeatureCursor** connectedElements


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.


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