Method Add
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Add(DxfDatabase, CadLinetypeDefinition)
Writes a linetype of the presenter's own as an LTYPE record of a drawing, as AutoCAD writes one: its name, its
description, 72 the alignment A, the count of its elements and its length, then each element's 49 and 74, and for a
text its 75 of nought, the handle of its text style (340), its scale, rotation and offset (46, 50, 44, 45) and the
text (9). GAS_LINE's gap of 5.08 carrying GAS in STANDARD is 49 -5.08, 74 2, 75 0, 340 Standard's handle
, 46 2.54, 50 0, 44 -2.54, 45 -1.27, 9 GAS. One of BuiltIn itself named like one of
AutoCAD's (CENTER, HIDDEN, DASHED and the rest) is written in the drawing's units, as AutoCAD takes acad.lin or
acadiso.lin by MEASUREMENT: CENTER in a metric drawing is 31.75, -6.35, 6.35, -6.35 and in one whose
MEASUREMENT is 0 it is 1.25, -0.25, 0.25, -0.25; any other definition is written as it is.
public static DxfLinetypeTableRecord Add(DxfDatabase database, CadLinetypeDefinition linetype)
Parameters
databaseDxfDatabaseThe drawing.
linetypeCadLinetypeDefinitionThe linetype.
Returns
- DxfLinetypeTableRecord
The record added.
Exceptions
- ArgumentNullException
Thrown when the drawing or the linetype is null.
- ArgumentException
Thrown when the linetype could not be read, the drawing has one of its name, a text names a style the drawing has not, or an element carries a shape, which is loaded from its file alone.