MeasurementUnit Example

Land Auto

MeasurementUnit Example

Sub Example_MeasurementUnit()
    
    ' This example returns the MeasurementUnit setting for the current drawing.
    Dim dbPref As AeccDatabasePreferences
    Set dbPref = AeccApplication.ActiveDocument.preferences
    
    ' Convert the measurement unit to a string.
    Dim unit As String
    If dbPref.MeasurementUnit = acEnglish Then
        unit = "english"
    Else
        unit = "metric"
    End If
    
    MsgBox "The current value for MeasurementUnit is " & unit, _
        vbInformation, "MeasurementUnit Example"
    
End Sub