VolumnDisplay Example

Land Auto

VolumnDisplay Example

Sub Example_VolumeDisplayUnit()
    
    ' This example returns the VolumeDisplayUnit 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.VolumeDisplayUnit
    Case aecUnitCubicInch
        unit = "cubic inch"
    Case aecUnitCubicFoot
        unit = "cubic foot"
    Case aecUnitCubicYard
        unit = "cubic yard"
    Case aecUnitCubicMil
        unit = "cubic millimeters"
    Case aecUnitCubicCentimeter
        unit = "cubic centimeters"
    Case aecUnitCubicDecimeter
        unit = "cubic decimeters"
    Case aecUnitCubicMeter
        unit = "cubic meters"
    End Select
    
    MsgBox "The current value for VolumeDisplayUnit is " & unit, _
        vbInformation, "VolumnDisplayUnit Example"
    
End Sub