FindAllFaces Example

Land Auto

FindAllFaces Example

Sub Example_FindAllFaces()
    
    ' This example begins by getting a faces collection for an entered
    ' point in the first surface in the collection. Then the FindAllFaces
    ' is used to get the entire faces collection.
    Dim surf As AeccSurface
    Dim faces As AeccFaces
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set faces = surf.Outputs.faces
    
    ' Return a point using a prompt
    Dim returnPnt As Variant
    returnPnt = ThisDrawing.Utility.GetPoint(, "Select a point: ")
    
    ' Find face points
    faces.FindFace returnPnt(0), returnPnt(1)
    
    MsgBox "The number of Faces in the collection after FindFace is: " & faces.Count, _
        vbInformation, "FindAllFaces Example"
    
    faces.FindAllFaces
    
    MsgBox "The number of Faces in the collection after FindAllFaces is: " & faces.Count, _
        vbInformation, "FindAllFaces Example"
    
End Sub