CadLinetypeDefinition
from OpenCAD2D import CadLinetypeDefinition
class CadLinetypeDefinition(System.Object) ยท CadLinetypeDefinition in the .NET reference
A linetype of a .lin file: its name, its description and the elements of its pattern; or, where its pattern cannot be read, the fault. DASHED of the presenter's own set is *DASHED,Dashed __ __ __ and A,6,-1.5: a dash 6 long and a gap of 1.5, 7.5 in all.
Constructors
__init__
def __init__(
self,
name: str,
description: str,
elements: System.Collections.Generic.IEnumerable[CadLinetypeElement],
) -> None
Makes a linetype.
Properties and fields
Description
@property
def Description(self) -> str
Gets the description: what follows the comma of the name's line.
Elements
@property
def Elements(self) -> System.Collections.Generic.IReadOnlyList[CadLinetypeElement]
Gets the elements of the pattern, in order; none where it could not be read.
Fault
@property
def Fault(self) -> str | None
Gets why the pattern could not be read; null where it was.
IsComplex
@property
def IsComplex(self) -> bool
Gets whether an element carries a text or a shape.
Name
@property
def Name(self) -> str
Gets the name.
PatternLength
@property
def PatternLength(self) -> float
Gets the length of the pattern: its lengths together, whatever their sign; 7.5 for a dash of 6 and a gap of 1.5.
PatternText
@property
def PatternText(self) -> str
Gets the pattern line as the file writes it: A,6,-1.5.
Methods
ToString
def ToString(self) -> str
Gets the two lines the file writes the linetype in, parted by a line feed: *DASHED,Dashed __ __ __ and A,6,-1.5.