Adds contours to a surface from entities in an ObjectIdCollection.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public SurfaceOperationAddContour AddContours(
ObjectIdCollection boundaryEntities,
double midOrdinateDistance,
double maximumDistance,
double weedingDistance,
double weedingAngle
) |
Visual Basic |
---|
Public Function AddContours ( _
boundaryEntities As ObjectIdCollection, _
midOrdinateDistance As Double, _
maximumDistance As Double, _
weedingDistance As Double, _
weedingAngle As Double _
) As SurfaceOperationAddContour |
Visual C++ |
---|
public:
SurfaceOperationAddContour^ AddContours(
ObjectIdCollection^ boundaryEntities,
double midOrdinateDistance,
double maximumDistance,
double weedingDistance,
double weedingAngle
) |
Parameters
- boundaryEntities
- Type: ObjectIdCollection
A collection of ObjectIds used to create contours.
- midOrdinateDistance
- Type: System..::..Double
When the contour is defined from a polyline with curves, the midOrdinateDistance value is used to tessellate the arcs in the polyline.
- maximumDistance
- Type: System..::..Double
Specifies the maximum distance between vertices. If the distance between vertices on a contour is greater than the maximumDistance, then points are added along the contour at equal intervals that are less than or equal to the maximumDistance.
- weedingDistance
- Type: System..::..Double
The distance value for the weeding factor.
- weedingAngle
- Type: System..::..Double
The angle value for the weeding factor.
Remarks
Examples
CopyC#
1
2
3
4[CommandMethod("CreateContour")]
5public void CreateContour()
6{
7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
8 {
9
10 ObjectId surfaceId = promptForEntity("Select a TIN surface to add a contour to", typeof(TinSurface));
11 ObjectId polyId = promptForEntity("Select a polyline to create a contour from", typeof(Polyline));
12 TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
13 ObjectId[] contours = { polyId };
14
15 oSurface.ContoursDefinition.AddContours(new ObjectIdCollection(contours), 1, 85.5, 55.5, 0);
16
17
18 ts.Commit();
19 }
20}
Exceptions
Exception | Condition |
---|
System..::..ArgumentException |
Thrown when:
- There are invalid ObjectIds in contourEntities.
- midOrdinateDistance <= 0.0, maximumDistance < 0.0, weedingDistance < 0.0 or weedingDistance >= maximumDistance
|
See Also