Table of Contents

CadOwnerTag

from OpenCAD2D import CadOwnerTag

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

The mark of an owned entity: the name of its owner, the id of the object it draws and, where the owner wants one, a second id, kept in the entity's extended data under the application CadOwnerTag.ApplicationName.

Constructors

__init__

.NET

def __init__(self, owner: str, objectId: str, extraId: str | None = ...) -> None

Makes a tag.

Properties and fields

ApplicationName

.NET

ApplicationName: ClassVar[str]

The name of the application whose extended data holds the tag: OPENCAD2D_OWNER.

ExtraId

.NET

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

Gets the second id; null where the tag has none.

ObjectId

.NET

@property
def ObjectId(self) -> str

Gets the id of the object the entity draws.

Owner

.NET

@property
def Owner(self) -> str

Gets the owner's name.

Methods

Remove

.NET

@staticmethod
def Remove(entity: DxfEntity) -> bool

Takes the tag out of an entity's extended data, the data of other applications kept: for a copy of an owned entity, which is the presenter's own and no longer its original owner's.

ToString

.NET

def ToString(self) -> str

Gives the tag as a line for debugging.

TryRead

.NET

@staticmethod
def TryRead(entity: DxfEntity) -> tuple[bool, CadOwnerTag]

Reads the tag of an entity: its extended data of CadOwnerTag.ApplicationName, two or three strings (1000), the owner and the object id not empty. Strings after the third are left unread.

WriteTo

.NET

def WriteTo(self, entity: DxfEntity) -> None

Writes the tag into an entity's extended data, in place of a tag it has; the data of other applications is kept. An entity in no drawing yet takes it when it is appended.