DatumElevation Example

Land Auto

DatumElevation Example

Examples:

l CrossSectionBlock (Civil Engineering Feature)

l ProfileBlock (Civil Engineering Feature)


Sub 
Example_DatumElevation_CrossSectionBlock()
    
    ' 
This example returns the datum elevation for the
    ' 
first alignment cross section in the collection.
    Dim 
alignXSects As AeccCrossSectionBlocks
    Dim 
alignXSect As AeccCrossSectionBlock
    Set 
alignXSects = AeccApplication.ActiveDocument.CrossSectionBlocks
    Set 
alignXSect = alignXSects.Item(0)
    
    'Get 
the station for the first alignment cross section in the collection
    Dim 
station As String
    station 
= alignXSect.station
    
    MsgBox 
"The datum elevation for the alignment cross section at station " & station & 
" is: " & _
        Format(alignXSect.DatumElevation, 
"0.00"), vbInformation, "DatumElevation Example"
    
End 
Sub

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