Direction Example

Land Auto

Direction Example

Examples:

l AlignTangent

l ProfileBlock (Civil Engineering Feature)


Sub Example_Direction_AlignTangent()
    
    ' This example returns the Direction for the first Tangent found in the
    ' first Alignment in the collection.
    Dim align As AeccAlignment
    Dim alignEnts As AeccAlignEntity
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    
    Dim alignMsg As String
    alignMsg = "There is no Tangent entity in the first Alignment."
    
    ' Find first Tangent in the alignment
    For Each alignEnt In align.AlignEntities
        If alignEnt.Type = kTangent Then
            alignMsg = "The Direction for the first Tangent in the alignment is: " & alignEnt.direction
            Exit For
        End If
    Next
    
    MsgBox alignMsg, vbInformation, "Direction Example"
    
End Sub

Sub Example_Direction_ProfileBlock()
    
    ' This example returns the Direction for the first ProfileBlock
    ' in the collection
    Dim alignProf As AeccProfileBlock
    Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
    
    MsgBox "The Direction for the first ProfileBlock in the collection is: " _
         & alignProf.Direction, vbInformation, "Direction Example"
    
End Sub