ArcObjects Library Reference  (NetworkAnalysis)    

ITraceFlowSolver.FindPath Method

Finds a path between the specified origins in the network.

[Visual Basic 6.0]
Sub FindPath(
    ByVal flowMethod As esriFlowMethod, _
    ByVal objFn As esriShortestPathObjFn, _
    junctionEIDs As IEnumNetEID, _
    edgeEIDs As IEnumNetEID, _
    ByVal Count As Long, _
    segmentCosts As Variant _
)
[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
);
[Java]
public void findPath (
    esriFlowMethod flowMethod,
    esriShortestPathObjFn objFn,
    IEnumNetEID junctionEIDs,
    IEnumNetEID edgeEIDs,
    int Count,
    Object segmentCosts
)
throws
    IOException,
    AutomationException
[C++]
HRESULT FindPath(
  esriFlowMethod flowMethod,
  esriShortestPathObjFn objFn,
  IEnumNetEID** junctionEIDs,
  IEnumNetEID** edgeEIDs,
  long Count,
  VARIANT* 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 VARIANT

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.

[C#]

This method is not callable from C#.  Please use ITraceFlowSolverGEN::FindPath.

[Visual Basic 6.0]

When using this method in VisualBasic code, initialize your array with the size equal to the Count, but only pass the first element of the array (pArray(0), for instance) to the trace solver through the segmentCosts parameter.  Even though just the first element is passed, all elements in the array will be populated by the trace solver.  For example:

  pTraceFlowSolver.FindPath esriFMConnected, esriSPObjFnMinSum, _
pJuncEIDs, pEdgeEIDs, lNumSegments, pSegmentCosts(0)
[Visual Basic .NET]

This method is not callable from VB.NET.  Please use ITraceFlowSolverGEN::FindPath.

See Also

ITraceFlowSolver Interface

 


Feedback Send feedback on this page