Table of Contents

CadFlatEntity

from OpenCAD2D import CadFlatEntity

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

One entity of a drawing walked down to the shapes it is drawn as: where it stands in the world, where it came from, and the look it has once its block references have given what is 0 and ByBlock to it. The entity is a copy the walk owns where it came out of a block, the drawing's own object where it stood in a space; either way it is read, not changed.

Properties and fields

Clipped

.NET

@property
def Clipped(self) -> bool

Gets whether a reference it came out of carries a clip (XCLIP), which the walk does not apply.

Color

.NET

@property
def Color(self) -> DxfColor

Gets the colour: the entity's own, where it is not ByBlock, else the colour of the reference it came out of.

Constant

.NET

@property
def Constant(self) -> bool

Gets whether it is a constant attribute definition of its block, a text the reference shows.

Dynamic

.NET

@property
def Dynamic(self) -> bool

Gets whether the block it came out of is a dynamic block's.

Entity

.NET

@property
def Entity(self) -> DxfEntity

Gets the entity, in world coordinates and the units of the drawing (CadFlatEntity.Scale takes them to millimetres).

Handle

.NET

@property
def Handle(self) -> str

Gets the handle of the entity of the space this one came out of: its own handle for one that stood in a space, the handle of the block reference of the space for one that came out of a block. An entity of a block has no handle of its own in the world, so the pieces of one reference share it, told apart by CadFlatEntity.IndexPath.

IndexPath

.NET

@property
def IndexPath(self) -> System.Collections.Generic.IReadOnlyList[int]

Gets where the entity stands in each level of the walk: its place among what the block reference at that level explodes into, then among what the next explodes into, and so on; a block reference's attributes follow its pieces, and the cells of an array of references (MINSERT) follow one another. Empty for an entity of a space. With the handle it names the entity, and it orders the pieces of one reference.

IsAttribute

.NET

@property
def IsAttribute(self) -> bool

Gets whether it is an attribute of a reference, or a constant attribute definition of a block.

Layer

.NET

@property
def Layer(self) -> str

Gets the layer: the entity's own, where it is not 0, else the layer of the reference it came out of.

Layout

.NET

@property
def Layout(self) -> str

Gets the name of the layout (or Model) the entity is drawn in.

Linetype

.NET

@property
def Linetype(self) -> str

Gets the linetype: the entity's own, where it is not ByBlock, else the linetype of the reference it came out of.

Matrix

.NET

@property
def Matrix(self) -> GeoTransform3 | None

Gets the transformation from the coordinates of the block the entity is in to the world, all the references of its CadFlatEntity.Path composed (the cell of an array included); null for an entity of a space.

Path

.NET

@property
def Path(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names of the blocks the entity came out of, the outermost first: BOLT, then HEAD for a circle in the block HEAD that the block BOLT places; empty for an entity of a space. A dynamic block is named by the dynamic block, not by the anonymous *U block it draws.

Scale

.NET

@property
def Scale(self) -> float

Gets the factor that takes its lengths to millimetres (CadUnitScale).