Removes the existing snapshot for the surface.

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

Syntax

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

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