SurfaceRemoveSnapshot Method |
Removes the existing snapshot for the surface.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic void RemoveSnapshot()
Public Sub RemoveSnapshot
public:
void RemoveSnapshot()
Example 1
2
3
4[CommandMethod("SurfaceIntersect")]
5public void SurfaceIntersect()
6{
7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
8 {
9
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
29 ts.Commit();
30 }
31}
See Also