TinSurfaceCreateByCropping(Database, String, ObjectId, Point3dCollection) Method

Creates a new TinSurface by cropping from an existing source TinSurface, and then inserts the new surface into another drawing. You must specify at least 3 points as the cropped area.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public static ObjectId CreateByCropping(
	Database destDatabase,
	string surfaceName,
	ObjectId srcSurfaceId,
	Point3dCollection points
)

Parameters

destDatabase  Database
The database to insert the new TinSurface into.
surfaceName  String
The new surface name.
srcSurfaceId  ObjectId
The ObjectId of the source surface.
points  Point3dCollection
The points that specify the cropped area.

Return Value

ObjectId
Exceptions
ExceptionCondition
ArgumentException Thrown when:
  1. The surfaceName is empty.
  2. srcSurfaceId is invalid or its type is not Autodesk.Civil.DatabaseServices.TinSurface.
  3. The points' count is less than 3.
  4. The srcSurfaceId and objects are not in the same database.
InvalidOperationException Thrown when srcSurfaceId is in destDatabase.
SurfaceException Thrown when this operation failed.
Remarks
You need to lock the destDatabase and then set it as the current document before you call this method.
See Also