ViewBlocks Example

AEC Auto

ViewBlocks Example

Sub Example_ViewBlocks()

    Dim ent As AcadEntity
    Dim pt As Variant
    Dim mvBlock As AecMVBlockRef
    Dim cViewBlocks As AecViewBlocks

    ThisDrawing.Utility.GetEntity ent, pt, "Select AEC Multi-View Block"
        
    If TypeOf ent Is AecMVBlockRef Then
        Set mvBlock = ent
        Set cViewBlocks = mvBlock.viewBlocks
        MsgBox "Number of View blocks is: " & cViewBlocks.Count, vbInformation, "StyleName Example"
    Else
        MsgBox "Not an AecMVBlockRef", vbExclamation, "StyleName Example"
    End If

End Sub