LinearUnit Example

Land Auto

LinearUnit Example

Sub Example_LinearUnit()
    
    ' This example returns the LinearUnit setting for the current drawing.
    Dim dbPref As AeccDatabasePreferences
    Set dbPref = AeccApplication.ActiveDocument.preferences
    
    ' Convert the volume display unit to a string.
    Dim unit As String
    Select Case dbPref.LinearUnit
    Case aecUnitInch
        unit = "inch"
    Case aecUnitFoot
        unit = "foot"
    Case aecUnitYards
        unit = "yard"
    Case aecUnitMil
        unit = "millimeters"
    Case aecUnitCentimeter
        unit = "centimeters"
    Case aecUnitDecimeter
        unit = "decimeters"
    Case aecUnitMeter
        unit = "meters"
    End Select
    
    MsgBox "The current value for LinearUnit is: " & unit, vbInformation, "LinearUnit Example"
    
End Sub