Rebuilds the snapshot for the surface.

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

Syntax

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

Remarks

You can rebuild a snapshot if any of the operations that precede it in the surface operation list are changed or removed.

Examples

CopyC#
 1/// <summary>
 2/// Illustrates using surface snapshots
 3/// </summary>
 4[CommandMethod("SurfaceIntersect")]
 5public void SurfaceIntersect()
 6{
 7    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 8    {
 9        // get the first surface in the document
10        ObjectId surfaceId = doc.GetSurfaceIds()[0];
11        TinSurface oSurface = surfaceId.GetObject(OpenMode.ForRead) as TinSurface;
12
13        try
14        {
15            if (oSurface.HasSnapshot)
16            {
17                oSurface.RemoveSnapshot();
18            }
19            oSurface.CreateSnapshot();
20            oSurface.RebuildSnapshot();
21        }
22
23        catch (System.Exception e)
24        {
25            editor.WriteMessage("Snapshot Operation Failed: {0}", e.Message);
26        }
27
28        // commit the transaction
29        ts.Commit();
30    }
31}

See Also