Name Example

AEC Auto

MVBlockRef Example

Examples:

l AecViewBlock

l AecViewBlocks


Sub Example_Name_AecViewBlock()

'This example shows the MVBlockRef's number of colors

    Dim obj As Object
    Dim pt As Variant
    Dim blockRef As AecMVBlockRef
    
    
    ThisDrawing.Utility.GetEntity obj, pt, "Select a Multiview Block"
    If TypeOf obj Is AecMVBlockRef Then
        Set blockRef = obj
        
        MsgBox "Colors of View Blocks MVBlockRef: " & blockRef.viewBlocks.Item(0).MVBlockRef.Color, vbInformation, "MVBlockRef Example"
    Else
        MsgBox "Not a Multiview Block", vbInformation, "MVBlockRef Example"
    End If

End Sub

Sub Example_Name_AecViewBlocks()

'This example shows the number of colors of the owner of the Viewblock collection

    Dim obj As Object
    Dim pt As Variant
    Dim blockRef As AecMVBlockRef
    Dim viewBlocks As AecViewBlocks
    
    ThisDrawing.Utility.GetEntity obj, pt, "Select a Multiview Block"
    If TypeOf obj Is AecMVBlockRef Then
        Set blockRef = obj
        Set viewBlocks = blockRef.viewBlocks
        MsgBox "Colors of MVBlockRef Owner: " & viewBlocks.MVBlockRef.Color, vbInformation, "MVBlockRef Example"
    Else
        MsgBox "Not a Multiview Block", vbInformation, "MVBlockRef Example"
    End If

End Sub