Table of Contents

ICadEntityOwner

from OpenCAD2D import ICadEntityOwner

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

Something outside the presenter that owns some of a drawing's entities and is asked before they change: a model drawing owns the lines, dimensions and marks it wrote. An entity is owned when its extended data carries a CadOwnerTag naming the owner; owners are found through a CadOwnerRegistry.

Properties and fields

Name

.NET

@property
def Name(self) -> str

Gets the owner's name, as the CadOwnerTag.Owner of its entities gives it: "ModelDrawing" for a model drawing. Names are compared character by character, case and all.

Methods

GetEditRule

.NET

def GetEditRule(self, entity: DxfEntity) -> CadEditRule

Says what the presenter may do to one of the owner's entities.

TryApply

.NET

def TryApply(self, document: CadDocument, edit: CadEdit) -> bool

Takes an edit of one of the owner's entities: the owner records it and changes or writes its entities again in the document; or refuses it, and the document stays as it was.