Search
PathFinder.FindShortestPath Method (DiagramNode, DiagramNode, Boolean, Boolean)
See Also
 





Finds and returns the shortest path between two DiagramNode elements, considering the Weight of the nodes, the Weight of the links or both.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Path FindShortestPath (
    DiagramNode from,
    DiagramNode to,
    bool useNodeWeights,
    bool useLinkWeights
)

Visual Basic  Copy Code

Public Function FindShortestPath( _
    from As DiagramNode, _
    to As DiagramNode, _
    useNodeWeights As Boolean, _
    useLinkWeights As Boolean _
) As Path

 Parameters

from
The first DiagramNode in the Path.
to
The last DiagramNode in the Path.
useNodeWeights
If true, the Path with minimal total weight is found, summing the Weight of nodes in the Path.
useLinkWeights
If true, the Path with minimal total weight is found, summing the Weight of links in the Path.

 Return Value

A Path instance that represents the shortest Path found or null (Nothing in Visual Basic) if there is no Path connecting from and to.

 See Also