FindPath Example

Land Auto

FindPath Example

Sub Example_FindPath()
    
    
    ' This example returns the face collection for an entered path in
    ' the first surface in the collection.
    Dim surf As AeccSurface
    Dim faces As AeccFaces
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set faces = surf.Outputs.faces
    
    MsgBox "The number of Faces in the collection before FindPath is: " & faces.Count _
        , vbInformation, "FindPath Example"
    
    'Select the path for faces
    Dim pnt1 As Variant
    Dim pnt2 As Variant
    pnt1 = ThisDrawing.Utility.GetPoint(, "Select first point on a surface: ")
    pnt2 = ThisDrawing.Utility.GetPoint(pnt1, "Select second point on a surface: ")
    
    faces.FindPath pnt1(0), pnt1(1), pnt2(0), pnt2(1)
    
    MsgBox "The number of Faces in the collection before FindPath is: " & faces.Count _
        , vbInformation, "FindPath Example"
    
End Sub