TinSurfaceCreateByCropping(Database, String, ObjectId, Point2dCollection) Method |
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.8.0.292
Syntaxpublic static ObjectId CreateByCropping(
Database destDatabase,
string surfaceName,
ObjectId srcSurfaceId,
Point2dCollection points
)
Public Shared Function CreateByCropping (
destDatabase As Database,
surfaceName As String,
srcSurfaceId As ObjectId,
points As Point2dCollection
) As ObjectId
public:
static ObjectId CreateByCropping(
Database^ destDatabase,
String^ surfaceName,
ObjectId srcSurfaceId,
Point2dCollection^ 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 Point2dCollection
- A collection of points that specifies the cropped area.
Return Value
ObjectId
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when :
- The surfaceName is empty.
- The srcSurfaceId is invalid or its type is not Autodesk.Civil.DatabaseServices.TinSurface.
- The points' count is less than 3.
- 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