Rebuilds the surface by processing all the operations one by one in the list.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 10.3.488.0

Syntax

C#
public void Rebuild()
Visual Basic
Public Sub Rebuild
Visual C++
public:
void Rebuild()

Remarks

You can check whether the Surface needs to be rebuilt by checking the IsOutOfDate property.

Examples

CopyC#
 1/// <summary>
 2/// Creates a boundary for a TIN surface from a polygon
 3/// </summary>
 4[CommandMethod("AddSurfaceBoundary")]
 5public void AddSurfaceBoundary()
 6{
 7    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 8    {
 9        // Prompt the user to select a surface and a polyline
10        ObjectId surfaceId = promptForEntity("Select the surface to add a boundary to", typeof(TinSurface));
11        ObjectId polyId = promptForEntity("Select the object to use as a boundary", typeof(Polyline));
12
13        // The boundary or boundaries must be added to an ObjectIdCollection for the AddBoundaries method:
14        ObjectId[] boundaries = { polyId };
15        TinSurface oSurface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
16
17        try
18        {
19            oSurface.BoundariesDefinition.AddBoundaries(new ObjectIdCollection(boundaries), 100, Autodesk.Civil.SurfaceBoundaryType.Outer, true);
20            oSurface.Rebuild();
21        }
22
23        catch (System.Exception e)
24        {
25            editor.WriteMessage("Failed to add the boundary: {0}", e.Message);
26        }
27
28        // commit the transaction
29        ts.Commit();
30    }
31}

See Also