LinearDisplayFormat Example

AEC Auto

LinearDisplayFormat Example

Sub Example_LinearDisplayFormat()
    
    ' This example returns the LinearDispalyFormat setting for the current drawing.
    Dim dbPref As AecArchBaseDatabasePreferences
    Set dbPref = AecArchBaseApplication.ActiveDocument.preferences
    
    ' Convert the linear display format to a string.
    Dim linearformat As String
    Select Case dbPref.LinearDisplayFormat
    Case 1
        linearformat = "Scientific"
    Case 2
        linearformat = "Decimal"
    Case 3
        linearformat = "Engineering"
    Case 4
        linearformat = "Architectural"
    Case 5
        linearformat = "Fractional"
    End Select
    
    MsgBox "The current value for LinearDisplayFormat is: " & linearformat, vbInformation, "LinearDisplayFormat Example"
    
End Sub