Creates a new TinSurface by cropping from a source TinSurface, and then inserts the new surface into another drawing. You must specify a cropped area with at least one AutoCAD drawing object.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.208.0
Syntax
C#
public static ObjectId CreateByCropping( Database destDatabase, string surfaceName, ObjectId srcSurfaceId, ObjectIdCollection objects, Point2d location )
Visual Basic
Public Shared Function CreateByCropping ( _ destDatabase As Database, _ surfaceName As String, _ srcSurfaceId As ObjectId, _ objects As ObjectIdCollection, _ location As Point2d _ ) As ObjectId
Visual C++
public: static ObjectId CreateByCropping( Database^ destDatabase, String^ surfaceName, ObjectId srcSurfaceId, ObjectIdCollection^ objects, Point2d location )
Parameters
- destDatabase
- Type: Database
The database to insert the new TinSurface into.
- surfaceName
- Type: System.String
The new surface name.
- srcSurfaceId
- Type: ObjectId
The ObjectId of the source surface.
- objects
- Type: ObjectIdCollection
The objects that specify the cropped area.
- location
- Type: Point2d
A location to identify the direction of the cropped area.
Remarks
The supported object types are: Polyline, Polyline2d, Polyline3d, ParcelSegment, FeatureLine, Circle, Arc, Ellipse, and Line.
Remarks
You need to lock the destDatabase and then set it as the current document before you call this method.
Exceptions
Exception | Condition |
---|---|
System.ArgumentException |
Thrown when:
|
System.InvalidOperationException | Thrown when srcSurfaceId is in destDatabase. |
Autodesk.Civil.SurfaceException | Thrown when this operation failed. |