Table of Contents

Class CadLinetypeFile

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Reads .lin files into CadLinetypeDefinitions as AutoCAD reads them, and carries the presenter's own set of linetypes (BuiltIn), the default. No file of AutoCAD's is carried or looked for: a .lin file is read only where the user names it or keeps it in a support folder of their own (CadSupportFiles).

public static class CadLinetypeFile
Inheritance
CadLinetypeFile
Inherited Members

Fields

BuiltInName

The name the presenter's own set goes by in the dialogs and on the command line: no file has it on disk.

Properties

BuiltIn

Gets the presenter's own 39 linetypes, in millimetres: DASHED, HIDDEN, CENTER, PHANTOM, DOT, DASHDOT, DIVIDE and BORDER, each with its half size (DASHED2) and double size (DASHEDX2); ACAD_ISO02W100 to ACAD_ISO15W100; and GAS_LINE. Continuous is not among them, as every drawing has it. Loaded into a drawing whose MEASUREMENT is 0 the first 24 and GAS_LINE take their lengths in inches instead (Add(DxfDatabase, CadLinetypeDefinition)).

Methods

Parse(string)

Reads the linetypes of the text of a .lin file, in its order: each opened by *NAME,description, its pattern on the next line that is not blank or a comment (;), A, and its elements. A linetype whose pattern cannot be read is given with its Fault, as AutoCAD refuses it alone.

ParsePattern(string, string, string)

Reads a pattern typed as -LINETYPE Create takes it, A,6,-1.5 or 6,-1.5, into a linetype of the name and description given; the fault said where it cannot be read.

Read(string)

Reads a .lin file: UTF-8 where its bytes are, else each byte its own character, as AutoCAD's own files are written in the code page of Windows.