01/29/2013

Adding boundaries to Civil 3D Surface object using .NET API

We can add
boundaries to Civil 3D Surface object using the SurfaceDefinitionBoundaries
class; this class encapsulates the boundary operation list for a surface. Note
that, operations are stored in the order they are performed on the surface.
SurfaceDefinitionBoundaries class has overloaded function AddBoundaries(). In
the following example we will see how to add boundaries to a surface from a
collection of entity ObjectIds using SurfaceOperationAddBoundary
AddBoundaries(ObjectIdCollection boundaryEntities, double midOrdinateDistance, SurfaceBoundaryType boundaryType, bool
useNonDestructiveBreakline )

There are few
important notes on this API mentioned in Civil 3D .NET API Reference document
which I am highlighting below -

The parameter
useNonDestructiveBreakline is ignored for a GridVolumeSurface or TinSurface
with a DataClip boundary type.

When creating
the DataClip/Outer boundary, the first ObjectId in boundaryEntities is used,
and any other ObjectIds in the collection are ignored.

The first
boundary in the boundaryEntities should be closed when creating a DataClip
boundary.

Comments

We can add
boundaries to Civil 3D Surface object using the SurfaceDefinitionBoundaries
class; this class encapsulates the boundary operation list for a surface. Note
that, operations are stored in the order they are performed on the surface.
SurfaceDefinitionBoundaries class has overloaded function AddBoundaries(). In
the following example we will see how to add boundaries to a surface from a
collection of entity ObjectIds using SurfaceOperationAddBoundary
AddBoundaries(ObjectIdCollection boundaryEntities, double midOrdinateDistance, SurfaceBoundaryType boundaryType, bool
useNonDestructiveBreakline )

There are few
important notes on this API mentioned in Civil 3D .NET API Reference document
which I am highlighting below -

The parameter
useNonDestructiveBreakline is ignored for a GridVolumeSurface or TinSurface
with a DataClip boundary type.

When creating
the DataClip/Outer boundary, the first ObjectId in boundaryEntities is used,
and any other ObjectIds in the collection are ignored.

The first
boundary in the boundaryEntities should be closed when creating a DataClip
boundary.