The GridVolumeSurface class represents a grid-based volume surface in Civil3D, used to calculate cut and fill volumes between two grid surfaces.
Autodesk.Civil.DatabaseServices
System.Object
└─ RXObject
└─ DBObject
└─ Entity
└─ Surface
└─ GridVolumeSurface
| Property | Type | Description |
|---|---|---|
BaseSurfaceId |
ObjectId |
Gets/sets the base surface |
ComparisonSurfaceId |
ObjectId |
Gets/sets the comparison surface |
using (Transaction tr = civilDoc.Database.TransactionManager.StartTransaction())
{
GridVolumeSurface volSurf = tr.GetObject(volumeSurfaceId, OpenMode.ForRead) as GridVolumeSurface;
ed.WriteMessage($"\nGrid Volume Surface: {volSurf.Name}");
Surface baseSurf = tr.GetObject(volSurf.BaseSurfaceId, OpenMode.ForRead) as Surface;
Surface compSurf = tr.GetObject(volSurf.ComparisonSurfaceId, OpenMode.ForRead) as Surface;
ed.WriteMessage($"\nBase Surface: {baseSurf.Name}");
ed.WriteMessage($"\nComparison Surface: {compSurf.Name}");
tr.Commit();
}- Surface - Base class
- GridSurface - Component surfaces
- CivilDocument - Container