GetBoundingBox Example

Land Auto

GetBoundingBox Example

Sub Example_GetBoundingBox()
    
    ' This example returns the two points defining the Bounding Box
    ' for the first surface in the collection.
    Dim surf As AeccSurface
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    
    Dim pntLL As Variant
    Dim pntUR As Variant
    
    ' Build the surface and get the bounding box points
    surf.Build
    surf.GetBoundingBox pntLL, pntUR
    
    MsgBox "Lower left bounding box point: " & pntLL(0) & ", " & pntLL(1) & ", " & pntLL(2) & _
        vbCrLf & _
        "Upper right bounding box point: " & pntUR(0) & ", " & pntUR(1) & ", " & pntUR(2) _
        , vbInformation, "GetBoundingBox Example"
    
End Sub