Adds contours to a surface from entities in an ObjectIdCollection.
public SurfaceOperationAddContour AddContours( ObjectIdCollection boundaryEntities, double midOrdinateDistance, double maximumDistance, double weedingDistance, double weedingAngle )
Public Function AddContours ( boundaryEntities As ObjectIdCollection, midOrdinateDistance As Double, maximumDistance As Double, weedingDistance As Double, weedingAngle As Double ) As SurfaceOperationAddContour
public: SurfaceOperationAddContour^ AddContours( ObjectIdCollection^ boundaryEntities, double midOrdinateDistance, double maximumDistance, double weedingDistance, double weedingAngle )
| Exception | Condition |
|---|---|
| ArgumentException |
Thrown when:
|
1/// <summary> 2/// Illustrates creating contours 3/// </summary> 4[CommandMethod("CreateContour")] 5public void CreateContour() 6{ 7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction()) 8 { 9 // Prompt the user to select a TIN surface and a polyline, and create a contour from the polyline 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 // commit the transaction 18 ts.Commit(); 19 } 20}