VerticalScale Example

Land Auto

VerticalScale Example

Examples:

l CrossSectionBlock (Civil Engineering Feature)

l DatabasePreferences

l ProfileBlock (Civil Engineering Feature)


Sub Example_VerticalScale_CrossSectionBlock()
    
    ' This example returns the vertical scale 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 vertical scale for the alignment cross section at station " & station & " is: " & _
        Format(alignXSect.VerticalScale, "0.00"), vbInformation, "VerticalScale Example"
    
End Sub

Sub Example_VerticalScale_DatabasePreferences()
    
    ' This example returns the vertical scale setting for the current drawing.
    Dim dbPref As AeccDatabasePreferences
    Set dbPref = AeccApplication.ActiveDocument.Preferences
    
    MsgBox "The current vertical scale for this drawing is: " & dbPref.VerticalScale, _
        vbInformation, "VerticalScale Example"
    
End Sub

Sub Example_VerticalScale_ProfileBlock()
    
    ' This example returns the vertical scale for the first alignment profile
    ' in the collection.
    Dim alignProf As AeccProfileBlock
    Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
    
    MsgBox "The vertical scale for the first alignment profile is: " & _
        Format(alignProf.VerticalScale, "0.00"), vbInformation, "VerticalScale Example"
    
End Sub