Table of Contents

Class DxfLinetypeTableRecord

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

A linetype of a DXF file, as AutoCAD's LinetypeTableRecord: its name, its description, the length of its pattern and its dashes, a dash above nought drawn, below nought a gap, nought a dot; a dash of a complex linetype carries a shape or a text, drawn in a style at a scale, a rotation and an offset of its own.

public sealed class DxfLinetypeTableRecord : DxfSymbolTableRecord
Inheritance
DxfLinetypeTableRecord
Inherited Members

Remarks

A linetype of a file is read from its LTYPE record; its AsciiDescription, PatternLength, and each dash's length, shape or text are set as any record's are, its record written anew and every other group kept; how many dashes it has is not changed yet. One made in code is given its dashes by NumDashes and SetDashLengthAt(int, double), and is written when it is added to a DxfLinetypeTable; its pattern is as long as its dashes and gaps together unless it is given a length.

The gas line of AutoCAD's acadiso.lin, a dash 0.5 long, then the text GAS in the style Standard, 0.1 high, 0.1 back and 0.05 down, in a gap of 0.2, is SetTextAt(1, "GAS"), SetShapeStyleAt(1, standard), SetShapeScaleAt(1, 0.1) and SetShapeOffsetAt(1, new GeoVector2(-0.1, -0.05)) on its second dash, written as AutoCAD writes it: 49 -0.2, 74 2, 75 0, 340 the handle of Standard, 46 0.1, 50 0.0, 44 -0.1, 45 -0.05, 9 GAS. A dash given a shape or a text and no scale is drawn at the scale 1. A file of R12 has no complex linetypes, which came with R13 (AC1012), and refuses them.

Constructors

DxfLinetypeTableRecord()

Initializes a linetype made in code, with no dashes: a continuous line until it is given some, to be added to a DxfLinetypeTable with its Name given.

Properties

AsciiDescription

Gets or sets the description of the linetype (group 3), as AutoCAD's AsciiDescription: __ __ __; empty where the record gives none.

Comments

Gets or sets the description of the linetype, as AutoCAD's Comments, which ObjectARX keeps in the same place as AsciiDescription (group 3): the one is the other.

NumDashes

Gets or sets how many dashes the pattern has (group 73), as AutoCAD's NumDashes; set on a linetype made in code, its new dashes nought long.

PatternLength

Gets or sets the length of the linetype's pattern (group 40), as AutoCAD's PatternLength: the dashes and gaps together, 0.75 for a dash of 0.5 and a gap of 0.25; nought where the record gives none.

Methods

DashLengthAt(int)

Gets the length of a dash of the pattern (the groups 49 in their order), as AutoCAD's DashLengthAt: above nought a dash, below nought a gap, nought a dot.

Erase()

Erases the linetype from its table, as AutoCAD's Erase of a linetype nothing draws with: its LTYPE record taken out, the table's count lowered by one, its handle not given again.

SetDashLengthAt(int, double)

Sets the length of a dash of the pattern, as AutoCAD's SetDashLengthAt: its group 49; the length of the pattern is kept as it is, as AutoCAD keeps it.

SetDependent(bool, bool)

Marks the linetype as one an external reference brings, as AutoCAD writes the linetypes of an external reference into the drawing that attaches it: flag 16 of group 70 where it comes from one, and 32 as well where that reference is resolved; AutoCAD 2021 writes 48 for the linetype grid|DASHED of a drawing attached and loaded, and 16 once it is unloaded.

SetShapeIsUcsOrientedAt(int, bool)

Sets whether a dash's shape or text is turned from the x axis rather than from the line, as AutoCAD's SetShapeIsUcsOrientedAt.

SetShapeNumberAt(int, int)

Sets the number of a dash's shape, as AutoCAD's SetShapeNumberAt: a number other than nought makes the dash one of a shape (74 of 4) where it has no text; nought one of no shape.

SetShapeOffsetAt(int, GeoVector2)

Sets the offset of a dash's shape or text, as AutoCAD's SetShapeOffsetAt.

SetShapeRotationAt(int, double)

Sets the rotation of a dash's shape or text in radians, as AutoCAD's SetShapeRotationAt, written as degrees.

SetShapeScaleAt(int, double)

Sets the scale of a dash's shape or text, as AutoCAD's SetShapeScaleAt.

SetShapeStyleAt(int, DxfTextStyleTableRecord)

Sets the text style a dash's shape or text is drawn in, as AutoCAD's SetShapeStyleAt: its handle as the group 340; null takes it out.

SetTextAt(int, string)

Sets the text of a dash, as AutoCAD's SetTextAt: a text makes the dash one of a text (74 of 2, its shape number 0); an empty one, one of no text.

ShapeIsUcsOrientedAt(int)

Gets whether a dash's shape or text is turned from the x axis rather than from the line (flag 1 of group 74), as AutoCAD's ShapeIsUcsOrientedAt.

ShapeNumberAt(int)

Gets the number of a dash's shape in its style's file of shapes (group 75), as AutoCAD's ShapeNumberAt: nought for a dash of no shape, and for a text.

ShapeOffsetAt(int)

Gets the offset of a dash's shape or text from where the dash is (groups 44 and 45), as AutoCAD's ShapeOffsetAt; nought where it gives none.

ShapeRotationAt(int)

Gets the rotation of a dash's shape or text (group 50) in radians, as AutoCAD's ShapeRotationAt: the record writes degrees; from the line, or from the x axis where ShapeIsUcsOrientedAt(int); nought where it gives none.

ShapeScaleAt(int)

Gets the scale of a dash's shape or text (group 46), as AutoCAD's ShapeScaleAt; nought where the dash gives none, as one of no shape or text.

ShapeStyleAt(int)

Gets the text style a dash's shape or text is drawn in (group 340), as AutoCAD's ShapeStyleAt gives its id: a style of shapes for a shape, one of letters for a text.

TextAt(int)

Gets the text of a dash (group 9), as AutoCAD's TextAt; empty for a dash of no text.