AreaDisplayUnit Example
Sub Example_AreaDisplayUnit()
' This example returns the AreaDisplayUnit setting for the current drawing.
Dim dbPref As AeccDatabasePreferences
Set dbPref = AeccApplication.ActiveDocument.preferences
' Convert the area display unit to a string.
Dim unit As String
Select Case dbPref.AreaDisplayUnit
Case aecUnitSquareInch
unit = "square inch."
Case aecUnitSquareFoot
unit = "square foot."
Case aecUnitSquareYard
unit = "square yard."
Case aecUnitSquareMil
unit = "square millimeters."
Case aecUnitSquareCentimeters
unit = "square centimeters."
Case aecUnitSquareDecimeters
unit = "square decimeters."
Case aecUnitSquareMeters
unit = "square meters."
End Select
MsgBox "The current value for AreaDisplayUnit is " & unit, vbInformation, "AreaDisplayUnit Example"
End Sub