AddTangent Example
Sub Example_AddTangent()
' This example adds an Alignment made up of a tangent,
' curve, and spiral entities.
Dim aligns As AeccAlignments
Dim align As AeccAlignment
Set aligns = AeccApplication.ActiveProject.Alignments
' Add an Alignment named "Example Alignment" and starting at Station 50.0
Set align = aligns.Add("Example Alignment", 50#)
' Add a tangent, curve, and spiral to the alignment
Dim tangent As AeccAlignTangent
Dim curve As AeccAlignCurve
Dim spiral As AeccAlignSpiral
Set tangent = align.AddTangent(0#, 0#, 150#, 0#)
Set spiral = align.AddSpiral(150#, 0#, 388.069176379758, -5.83082052087824E-14, 250#, 100#, 0, 0, kClothoid)
Set curve = align.AddCurve(250, 100#, 320.966940499621, 197.983470249737, 200#, 200#, False)
MsgBox "The total number of entities in the Alignment is: " & align.AlignEntities.count , vbInformation, "AddTangent Example"
End Sub