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


ITraceFlowSolverGEN.FindPath Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (NetworkAnalysis)  

ITraceFlowSolverGEN.FindPath Method

Finds a path between the specified origins in the network.

[Visual Basic .NET]
Public Sub FindPath ( _
    ByVal flowMethod As esriFlowMethod, _
    ByVal objFn As esriShortestPathObjFn, _
    ByRef junctionEIDs As IEnumNetEID, _
    ByRef edgeEIDs As IEnumNetEID, _
    ByVal Count As Integer, _
    ByRef segmentCosts As Object[]& _
)
[C#]
public void FindPath (
    esriFlowMethod flowMethod,
    esriShortestPathObjFn objFn,
    ref IEnumNetEID junctionEIDs,
    ref IEnumNetEID edgeEIDs,
    ref int Count,
    ref Object[]& segmentCosts
);
[C++]
HRESULT FindPath(
  esriFlowMethod flowMethod,
  esriShortestPathObjFn objFn,
  IEnumNetEID** junctionEIDs,
  IEnumNetEID** edgeEIDs,
  long Count,
  segmentCosts* segmentCosts
);
[C++]

Parameters flowMethod [in]
flowMethod is a parameter of type esriFlowMethod objFn [in]
objFn is a parameter of type esriShortestPathObjFn junctionEIDs [out]
junctionEIDs is a parameter of type IEnumNetEID edgeEIDs [out]
edgeEIDs is a parameter of type IEnumNetEID Count [in] Count is a parameter of type long segmentCosts [in, out] segmentCosts is a parameter of type

Product Availability

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

Remarks

The FlowMethod parameter determines whether the trace solver traces upstream, downstream, or on all connected edges.

The objFn parameter specifies the objective function of the trace solver. Depending on this parameter, the trace solver will either attempt to minimize the total cost of the path, or will attempt to minimize the maximum cost of any single element in the path.

The Count is the number of path segments to be returned by the trace solver. It is equivalent to one less than the number of flags being passed into the trace solver. The Count is also the size of the array passed into the segmentCosts parameter.

The origins you place on the network using PutEdgeOrigins or PutJunctionOrigins must be either all edge origins or all junction origins. You cannot find a path among a mixture of edge and junction origins.

The trace solver will return the traced junction and edge element IDs in the junctionEIDs and edgeEIDs parameters respectively, and will return the cost of each segment in the segmentCosts array.

The traced element IDs are returned in the order that they were traced.

See Also

ITraceFlowSolverGEN Interface