Table of Contents

CadSnapshot

from OpenCAD2D import CadSnapshot

class CadSnapshot(System.Object) ยท CadSnapshot in the .NET reference

A drawing as it stood at one moment, kept in memory by CadDocument.TakeSnapshot to put the drawing back to with CadDocument.Reset: for a program that runs an episode of edits on a drawing, many times over, from the same start (training a model, trying layouts) and cannot afford to read the file again. A snapshot holds the drawing compressed (a drawing of 10 000 entities, about 0.2 MB) while it is kept, and may be reset to as often as wanted.

Properties and fields

Document

.NET

@property
def Document(self) -> CadDocument

Gets the document the snapshot is of: the only one it can be reset to.