Code Example
Examples:
l CrossSectionPointCode (Civil Engineering Feature)
Sub Example_Code_CrossSectionPointCode()
' This example returns the point code data for the first cross
' section surface in the collection for the first cross section
' in the collection.
Dim aligns As AeccAlignments
Dim align As AeccAlignment
Dim xSect As AeccCrossSection
Dim xSectPCode As AeccCrossSectionPointCode
Set aligns = AeccApplication.ActiveProject.Alignments
Set align = aligns.Item(0)
Set xSect = align.CrossSections.Item(0)
Set xSectPCode = xSect.CrossSectionPointCodes.Item(0)
' Get the alignment name
Dim alignName As String
alignName = align.Name
' Get the cross section station and format it
Dim station As String
station = aligns.DoubleToStaFormat(xSect.station)
MsgBox "The alignment name is: " & alignName & vbCrLf & _
"The first cross section is at station: " & station & vbCrLf & _
"The data for the first point code is: " & vbCrLf & _
vbTab & "Code: " & xSectPCode.Code & vbCrLf & _
vbTab & "Description: " & xSectPCode.Description & vbCrLf & _
vbTab & "Elevation: " & Format(xSectPCode.elevation, "0.00") & vbCrLf & _
vbTab & "Offset: " & Format(xSectPCode.offset, "0.00"), _
vbInformation, "Code Example"
End Sub
Sub Example_Code_DescriptionKey()
' This example returns the Code for the first DescriptionKey
' in the first DescriptionKeyFile in the collection.
Dim dKeyFile As AeccDescriptionKeyFile
Dim dKey As AeccDescriptionKey
Set dKeyFile = AeccApplication.ActiveProject.DescriptionKeyFiles.Item(0)
Set dKey = dKeyFile.Item(0)
MsgBox "The value for DescriptionKey Code is " & dKey.Code, vbInformation, "Code Example"
End Sub