ConvertToCurrentVolumeDisplay Example
Sub Example_ConvertToCurrentVolumeDisplay()
' This example returns the value of ConvertToCurrentVolumeDisplay
' for the current drawing.
Dim dbPref As AeccDatabasePreferences
Set dbPref = AeccApplication.ActiveDocument.preferences
' Set the volume display units to cubic yards
dbPref.VolumeDisplayUnit = aecUnitCubicYard
Dim SourceArea As Double
Dim TargetArea As Double
SourceArea = 54# 'Cubic feet, assumes drawing set to foot units
TargetArea = dbPref.ConvertToCurrentVolumeDisplay(SourceArea)
MsgBox "The area to convert is 54 cubic feet." & vbCrLf & _
"The VolumnDisplayUnit is set to cubic yard." & vbCrLf & _
"The value for ConvertToCurrentVolumeDisplay is " & TargetArea & " square yards.", _
vbInformation, "ConvertToCurrentVolumnDisplay Example"
End Sub