Creates one or more polylines that represent a flow of water, and marks the start point of the path. This method exposes the Water Drop command
from the Civil 3D GUI.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public ObjectIdCollection CreateWaterdrop(
Point2d location,
WaterdropObjectType objectType
) |
Visual Basic |
---|
Public Function CreateWaterdrop ( _
location As Point2d, _
objectType As WaterdropObjectType _
) As ObjectIdCollection |
Visual C++ |
---|
public:
ObjectIdCollection^ CreateWaterdrop(
Point2d location,
WaterdropObjectType objectType
) |
Parameters
- location
- Type: Point2d
The location at which to create waterdrop object(s).
- objectType
- Type: Autodesk.Civil..::..WaterdropObjectType
An enum value that indicates what type of entity to create:
- WaterdropObjectType::Polyline2D creates polylines of type Autodesk.AutoCAD.Database.Polyline.
- WaterdropObjectType::Polyline3D creates polylines of type Autodesk.AutoCAD.Database.Polyline3d.
Return Value
An ObjectIdCollection containing the ObjectId for all polylines created by the method.
Remarks
Examples
CopyC#
1
2foreach (TinSurfaceTriangle t in oTinSurface.Triangles)
3{
4
5 double cx = (t.Vertex1.Location.X + t.Vertex2.Location.X + t.Vertex3.Location.X) / 3;
6 double cy = (t.Vertex1.Location.Y + t.Vertex2.Location.Y + t.Vertex3.Location.Y) / 3;
7
8 Point2d centLoc = new Point2d(cx, cy);
9
10
11
12 ObjectIdCollection oid = oTinSurface.Analysis.CreateWaterdrop(centLoc, Autodesk.Civil.WaterdropObjectType.Polyline3D);
13
14
15 foreach (ObjectId id in oid)
16 {
17 drops.Add(id);
18 }
19}
Exceptions
Exception | Condition |
---|
System..::..ArgumentException |
Thrown when the location is outside of the surface.
|
See Also