I would approach it by looping through the AreaVolume Method, something like
the following algorithm ( not exact code):
surf.GetBoundingBox pntLL, pntUR
' create a 4*3 point array, where the planimetric coordinates are taken
from the pntLL and pntUR of the surface.
For i = botelev to topelev step 1
' z coordinate = cutting plane elev
areaPnts(2) = i
areaPnts(5) = i
areaPnts(8) = i
areaPnts(11) = i
surf.AreaVolume .05, areaPnts, cut, fill, net
If you are doing stage-storage you are probably interested in only the fill
numbers, you should not have to closely define the exact boundary of each
plane. This assumes that the built surface does not fall away from the top
of berm. If you need some boundary internal to a given surface, you will
need the user to input the boundary of the top of the basin or pond
(overflow or top of berm) which you will use in the areaPnts array (does not
need to be rectangular).
The areavolume method is pretty slow. If you find it too slow, the other
option is to loop through the faces collection and do your own truncated
prism math for each face. More complicated code - but much faster.
"Craig Barrett" wrote in message
> Does anyone know of any VBA code that will do volume cut/fill on a surface
> from a cutting plane at a 1 foot increment. I'm trying to do a stage
> storage on a dtm.
Another way may be to use the SampleElevations function to sample the
surfaces along a line. The function will return a point array as a variant
array of doubles. These can be converted to a polyline that you could square
up, and ask for it's area. You do that again one foot in, and use average
end area to make the estimate. You could even leave the polylines in the
drawing to show how the calculations were made.
API Product Manager
You'll have to forgive Peter, he's from the Architecture side.
Stage-storage should be handled in the way Steve described. Peters analysis
would work well if you wanted to Site earthwork via profiles like we used to
James Wedding, P.E.
Jones & Boyd, Inc.
XP/2 on P4-3.4/1G
Sign up now for AU2004!
I have written a routine to do just what you are asking for. If you haven't
already found a solution drop me an email and I will send it your way.
witzel at garrett-eng dot com
It gets the required elevations from an excel spreadsheet and then reports
the corresponding elevations back to the same spreadsheet. This allows you
to determine which elevations are important to you. We needed to do stage
storage but then also give volumes at specific intervals for example 846.55
Water quality elevation.
Garrett Ihnen Civil Engineers