ProfileByType Example
Examples:
l EGProfiles (Civil Engineering Feature)
l FGProfiles (Civil Engineering Feature)
Sub Example_ProfileByType_EGProfiles()
' This example gets the surface name of the first existing ground profile
' in the first alignment in the collection. An existing ground profile is set based
' upon the surface name with a center type.
Dim align As AeccAlignment
Dim EGProf As AeccEGProfile
Dim cenEGProf As AeccEGProfile
Set align = AeccApplication.ActiveProject.Alignments.Item(0)
Set EGProf = align.EGProfiles.Item(0)
Dim surfName As String
surfName = EGProf.SurfaceName
Set cenEGProf = align.EGProfiles.ProfileByType(kEgCenter, surfName)
MsgBox "The first station for the center existing ground profile is: " _
& cenEGProf.StationElevations(0), vbInformation, "ProfileByType Example"
End Sub
Sub Example_ProfileByType_FGProfiles()
' This example uses the ProfileByType method to get the finished ground profile
' based on a center type, for the the first alignment in the collection.
Dim align As AeccAlignment
Dim FGProf As AeccFGProfile
Set align = AeccApplication.ActiveProject.Alignments.Item(0)
Set FGProf = align.FGProfiles.Item(0)
Set FGProf = align.FGProfiles.ProfileByType(kEgCenter)
MsgBox "The Type of the finished ground profile is: " _
& FGProf.Type, vbInformation, "ProfileByType Example"
End Sub