Table of Contents

CadOwnerEditGate

from OpenCAD2D import CadOwnerEditGate

class CadOwnerEditGate(ICadEditGate) ยท CadOwnerEditGate in the .NET reference

The gate a document asks before it changes an entity, made from the owners registered with it: an entity with no owner tag is edited freely, one of an owner is edited as that owner's CadEditRule says (a move only, nothing at all, or anything), and a refusal says why in the words the command line shows.

Constructors

__init__

.NET

def __init__(self, registry: CadOwnerRegistry) -> None

Makes a gate over a registry of owners.

Methods

Allows

.NET

def Allows(self, document: CadDocument, entity: DxfEntity, record: CadEditRecord) -> tuple[bool, str]

Asks whether one planned change of an entity may be made.

KindOf

.NET

@staticmethod
def KindOf(record: CadEditRecord) -> CadEditKind

Gets which kind of edit of the owner contract a planned change is: a transformation is the move, rotation, scale or mirror its property names, a grip drag that only translates (an insertion point, a centre, a middle grip) is a move, and reshaping is a grip edit.