CadLinetypeElement
from OpenCAD2D import CadLinetypeElement
class CadLinetypeElement(System.Object) ยท CadLinetypeElement in the .NET reference
An element of a linetype's pattern as a .lin file writes it: a length (above nought a dash, below a gap, nought a dot), and the text or shape in brackets after it, if any. -2.4,["GAS",STANDARD,S=1.2,R=0.0,X=-1.2,Y=-0.6] is a gap 2.4 long carrying the text GAS in the style STANDARD, 1.2 high, 1.2 back and 0.6 down from the gap's end.
Constructors
__init__
def __init__(self, length: float) -> None
Makes an element of a length alone.
def __init__(
self,
length: float,
kind: CadLinetypeElementKind,
value: str,
style: str,
scale: float,
rotation: float,
rotationKind: CadLinetypeRotation,
x: float,
y: float,
) -> None
Makes an element carrying a text or a shape.
Properties and fields
Kind
@property
def Kind(self) -> CadLinetypeElementKind
Gets what the element carries.
Length
@property
def Length(self) -> float
Gets the length: above nought a dash, below a gap, nought a dot.
Rotation
@property
def Rotation(self) -> float
Gets the rotation, in degrees.
RotationKind
@property
def RotationKind(self) -> CadLinetypeRotation
Gets what the rotation is measured from.
Scale
@property
def Scale(self) -> float
Gets the scale (S); 1 where the file gives none.
Style
@property
def Style(self) -> str | None
Gets the text style of a text, or the file of shapes of a shape; null for a dash.
Value
@property
def Value(self) -> str | None
Gets the text, or the shape's name or number; null for a dash.
X
@property
def X(self) -> float
Gets the offset along the line (X).
Y
@property
def Y(self) -> float
Gets the offset across the line (Y).
Methods
ToString
def ToString(self) -> str
Gets the element as the file writes it: -2.4,["GAS",STANDARD,S=1.2,R=0,X=-1.2,Y=-0.6].