property Element.PathTo (ElementTo as Element) as Boolean
Determines if there is any path from the current element to the specified element.

TypeDescription
ElementTo as Element An Element object that specifies the ending element
Boolean A Boolean expression that specifies if a path exists between current element to specified element. A Path is defined by the element and its outgoing links.
The PathTo property indicates if a path exists from current element to specified element. The OutgoingLinks property specifies the list of links that starts from the current element. The IncomingLinks property specifies the list of links that ends on the current element. The ElementFrom property of the Link object indicates where the Link starts. The ElementTo property of the Link object indicates where the Link ends. Use the ShowLinksColor(exShowLinksStartsFrom)/ ShowLinksStyle(exShowLinksStartsFrom)/ShowLinksWidth(exShowLinksStartsFrom) properties to mark the outgoing links of selected elements. 

For instance, you can use the PathTo property to prevent adding cycles in the chart, as in the following VB sample:

Private Sub SwimLane1_AllowLink(ByVal ElementFrom As EXSWIMLANELibCtl.IElement, ByVal ElementTo As EXSWIMLANELibCtl.IElement, Cancel As Boolean)
    Cancel = ElementTo.PathTo(ElementFrom)
End Sub

The AllowLink event notifies that the user links two elements.

The following screen shot shows the path between Element A and Element B: