TinSurfaceAddVertices(Point3dCollection) Method |
Adds multiple vertices to the TinSurface object.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic SurfaceOperationAddTinMultipleVertices AddVertices(
Point3dCollection locations
)
Public Function AddVertices (
locations As Point3dCollection
) As SurfaceOperationAddTinMultipleVertices
public:
SurfaceOperationAddTinMultipleVertices^ AddVertices(
Point3dCollection^ locations
)
Parameters
- locations Point3dCollection
- Locations where vertices will be added.
Return Value
SurfaceOperationAddTinMultipleVertices
Example 1[CommandMethod("CreateTINSurface")]
2public void CreateTINSurface()
3{
4 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
5 {
6 string surfaceName = "ExampleTINSurface";
7
8 ObjectId surfaceStyleId = doc.Styles.SurfaceStyles[3];
9
10
11 ObjectId surfaceId = TinSurface.Create(surfaceName, surfaceStyleId);
12
13 TinSurface surface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
14
15
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
29 ts.Commit();
30 }
31}
See Also