Table of Contents

CadEditRecord

from OpenCAD2D import CadEditRecord

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

One small record of an edit: which entity, what was done to it and, for a property, its value before and after, as text. An undo step is a list of these. They say what changed, so that the canvas draws again only the spaces touched and an owner of an entity can recognise an edit of its own; what the drawing was before is kept by the document whole (see CadDocument.Undo), so the records never need to be enough to undo an edit by themselves.

Constructors

__init__

.NET

def __init__(
    self,
    kind: CadEditRecordKind,
    handle: str,
    property: str | None = ...,
    oldValue: str | None = ...,
    newValue: str | None = ...,
) -> None

Makes a record.

Properties and fields

Handle

.NET

@property
def Handle(self) -> str | None

Gets the handle of the entity, or null for an edit of a table or a setting.

Kind

.NET

@property
def Kind(self) -> CadEditRecordKind

Gets what the edit does.

NewValue

.NET

@property
def NewValue(self) -> str | None

Gets the value after, as text, or null.

OldValue

.NET

@property
def OldValue(self) -> str | None

Gets the value before, as text, or null.

Property

.NET

@property
def Property(self) -> str | None

Gets the name of the property set, or null.

Space

.NET

@property
def Space(self) -> str | None

Gets the name of the space the entity is in ("Model", or a layout's name), filled in by the document when the edit is applied; null for an edit of a table or a setting, and for an entity inside a block.

Methods

ToString

.NET

def ToString(self) -> str