Adds multiple vertices to the TinSurface object.
Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.280
Syntax
C#
public SurfaceOperationAddTinMultipleVertices AddVertices( Point3dCollection locations )
VB
Public Function AddVertices ( locations As Point3dCollection ) As SurfaceOperationAddTinMultipleVertices
C++
public: SurfaceOperationAddTinMultipleVertices^ AddVertices( Point3dCollection^ locations )
Parameters
- locations Point3dCollection
- Locations where vertices will be added.
Return Value
SurfaceOperationAddTinMultipleVerticesExample
1[CommandMethod("CreateTINSurface")] 2public void CreateTINSurface() 3{ 4 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction()) 5 { 6 string surfaceName = "ExampleTINSurface"; 7 // Select a style to use 8 ObjectId surfaceStyleId = doc.Styles.SurfaceStyles[3]; 9 10 // Create the surface 11 ObjectId surfaceId = TinSurface.Create(surfaceName, surfaceStyleId); 12 13 TinSurface surface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface; 14 15 // Add some random points 16 Point3dCollection points = new Point3dCollection(); 17 Random generator = new Random(); 18 for (int i = 0; i < 10; i++) 19 { 20 double x = generator.NextDouble() * 250; 21 double y = generator.NextDouble() * 250; 22 double z = generator.NextDouble() * 100; 23 points.Add(new Point3d(x, y, z)); 24 } 25 26 surface.AddVertices(points); 27 28 // commit the create action 29 ts.Commit(); 30 } 31}