AreaVolume Example
Sub Example_AreaVolume()
' This example returns the Cut, Fill and Net Volumes of the first surface in the collection.
Dim surf As AeccSurface
Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
Dim count as Long
Dim index as Long
Dim cut As Double
Dim fill As Double
Dim tolerance As Double
Dim net As Double
Dim pnt as Variant
Dim areaPnts(0 To 14) As Double
index = 0
'Define a area based upon 5 entered points
For count = 1 To 5
pnt = ThisDrawing.Utility.GetPoint(, "Select point" + str(count) + " for area: ")
areaPnts(index) = pnt(0): areaPnts(index + 1) = pnt(1): areaPnts(index + 2) = 100#
index = index + 3
Next count
' Get volume data
surf.AreaVolume 1.0, areaPnts, cut, fill, net
MsgBox "The AreaVolumn data for the first surface is:" & vbCrLf & _
" Cut: " & cut & vbCrLf & _
" Fill: " & fill & vbCrLf & _
" Net: " & net, vbInformation, "AreaVolumn Example"
End Sub