Creates a new TinSurface by cropping from an existing source TinSurface, and then inserts the new surface into another drawing. You must specify the cropped area with at least 3 points.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.3.1717.0
Syntax
C#
public static ObjectId CreateByCropping( Database destDatabase, string surfaceName, ObjectId srcSurfaceId, Point2dCollection points )
Visual Basic
Public Shared Function CreateByCropping ( _ destDatabase As Database, _ surfaceName As String, _ srcSurfaceId As ObjectId, _ points As Point2dCollection _ ) As ObjectId
Visual C++
public: static ObjectId CreateByCropping( Database^ destDatabase, String^ surfaceName, ObjectId srcSurfaceId, Point2dCollection^ points )
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.
- points
- Type: Point2dCollection
A collection of points that specifies the cropped area.
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. |