AlignEntities Example

Land Auto

AlignEntities Example

Sub Example_AlignEntities()
    
    ' This example gets the count of AlignEntities for the
    ' first alignment in the collection.
    Dim align As AeccAlignment
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    Dim count As Integer
    
    ' Get the number of entities
    count = align.AlignEntities.count
    
    If count = 0 Then
        MsgBox; "The first Alignment in the collection has no entities.", _
            vbInformation;, "AlignEntities Example"
    ElseIf count = 1 Then
        MsgBox; "The first Alignment in the collection has 1 entity.", _
            vbInformation;, "AlignEntities Example"
    ElseIf count > 1 Then
        MsgBox; "The firstAlignment in the collection has " & count & " entities.", _
            vbInformation;, "AlignEntities Example"
    End If
    
End Sub