EdgeWidthJustify Example

AEC Auto

EdgeWidthJustify Example

Sub Example_EdgeWidthJustify()

    ' This example will display the edge width justification of the selected AecPolygon

    Dim obj As AcadObject
    Dim pt As Variant
    
    ThisDrawing.Utility.GetEntity obj, pt, "Select AecPolygon"
    
    If TypeOf obj Is AecPolygon Then
        Dim polygon As AecPolygon
        Dim polygonStyle As AecPolygonStyle
        Set polygon = obj
        Set polygonStyle = polygon.Style
        Select Case polygonStyle.EdgeWidthJustify
            Case aecPolygonEdgeWidthJustificationCenter
                MsgBox "Polygon EdgeWidthJustify CENTER", vbInformation, "EdgeWidthJustify Example"
            Case aecPolygonEdgeWidthJustificationIn
                MsgBox "Polygon EdgeWidthJustify is IN", vbInformation, "EdgeWidthJustify Example"
            Case aecPolygonEdgeWidthJustificationOut
                MsgBox "Polygon EdgeWidthJustify is OUT", vbInformation, "EdgeWidthJustify Example"
        End Select
    Else
        MsgBox "No AecPolygon Selected", vbInformation, "EdgeWidthJustify Example"
    End If

End Sub