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__
def __init__(
self,
kind: CadEditRecordKind,
handle: str,
property: str | None = ...,
oldValue: str | None = ...,
newValue: str | None = ...,
) -> None
Makes a record.
Properties and fields
Handle
@property
def Handle(self) -> str | None
Gets the handle of the entity, or null for an edit of a table or a setting.
Kind
@property
def Kind(self) -> CadEditRecordKind
Gets what the edit does.
NewValue
@property
def NewValue(self) -> str | None
Gets the value after, as text, or null.
OldValue
@property
def OldValue(self) -> str | None
Gets the value before, as text, or null.
Property
@property
def Property(self) -> str | None
Gets the name of the property set, or null.
Space
@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
def ToString(self) -> str