Table of Contents

CadEdit

from OpenCAD2D import CadEdit

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

One edit of one entity, as the presenter hands it to the entity's owner (ICadEntityOwner.TryApply) before it changes anything: which entity, what kind of edit, which property, and the values before and after.

Constructors

__init__

.NET

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

Makes an edit of one entity.

Properties and fields

Handle

.NET

@property
def Handle(self) -> str

Gets the handle of the entity edited.

Kind

.NET

@property
def Kind(self) -> CadEditKind

Gets what the edit does.

NewValue

.NET

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

Gets the value after the edit; null where the kind has none.

OldValue

.NET

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

Gets the value before the edit; null where the kind has none.

Property

.NET

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

Gets the property changed, or the index of the grip dragged; null where the kind has none.

Methods

ToString

.NET

def ToString(self) -> str

Gives the edit as a line for debugging.