Search
FlowChart.FindLongestPath Method
See Also
 



Finds the longest path between nodes in the diagram.

 Syntax

VB6  Copy Code

Public Function FindLongestPath () As IArrows

C++  Copy Code

public:
IArrows* FindLongestPath ()

 Return Value

A collection of Arrow objects which make up the longest path.

 Remarks

The path containing the largest number of arrows is considered the longest one. The path returned by this method comprises a collection of arrows. The nodes included in the path can be found through the arrows' Origin and Destination properties.

 Example

The following method paints in red the arrows included in the longest path.

VB6  Copy Code

Private Sub path_Click()

    Dim path As IArrows
    Set path = fcx.FindLongestPath

    Dim link As Arrow
    For Each link In path
        link.Color = vbRed
    Next link

End Sub

 See Also