ApplyResize Example

AEC Auto

ApplyResize Example

Sub Example_ApplyResize()

    ' This example will take a mass element anchored to a 2D Layout Grid, and
    '  apply a Resize Offset to it.

    Dim obj As AcadObject
    Dim anchor As AecAnchorEntToLayoutCell
    Dim pt As Variant
    ThisDrawing.Utility.GetEntity obj, pt, "Select anchored element"
    If TypeOf obj Is AecMassElement Then
        Dim mass As AecMassElement
        Set mass = obj
        If TypeOf mass.GetAnchor Is AecAnchorEntToLayoutCell Then
            Set anchor = mass.GetAnchor
            anchor.ResizeOffset = -22
            anchor.ApplyResize = False
        End If
    End If

End Sub