Rings Example

AEC Auto

Rings Example

Sub Example_Rings()

'This example shows the number of rings of the profile of an AecPolygon

    Dim obj As Object
    Dim pt As Variant
    Dim poly As AecPolygon
    
    ThisDrawing.Utility.GetEntity obj, pt, "Select an AECPolygon"
    If TypeOf obj Is AecPolygon Then
        Set poly = obj
        MsgBox "Profile Rings: " & poly.Profile.rings.Count, vbInformation, "Rings Example"
    Else
        MsgBox "Not a Polygon or no Profile Found", vbInformation, "Rings Example"
    End If

End Sub