Table of Contents

Class DxfXrecord

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

An XRECORD of a DXF file, as AutoCAD's Xrecord: a list of groups an application keeps under a name of a DxfDBDictionary, read and written as the file holds them.

public sealed class DxfXrecord : DxfDBObject, IEnumerable<DxfTypedValue>, IEnumerable
Inheritance
DxfXrecord
Implements
Inherited Members
Extension Methods

Remarks

Its Data is what AutoCAD gives as a ResultBuffer: the groups after its subclass marker and its cloning flag (280), each a code and the text the file prints, new DxfTypedValue(1, "B-12") a text and new DxfTypedValue(40, "2.5") a real. Made in code and added to a dictionary, db.NamedObjectsDictionary.SetAt("GH_PLATE", new DxfXrecord { Data = new[] { new DxfTypedValue(1, "B-12"), new DxfTypedValue(40, "12.5") } }) writes an XRECORD of two groups owned by the named object dictionary, as AutoCAD writes one.

The groups 102 of the data are the data's own: the overrides AutoCAD keeps for a layer in a viewport are XRECORDs of groups such as 102 {ADSK_LYR_COLOR_OVERRIDE, 335 the viewport, 420 the colour, 102 }.

Constructors

DxfXrecord()

Initializes an XRECORD made in code, with no data, to be added to a dictionary by SetAt(string, DxfDBObject), as AutoCAD's Xrecord() is.

Properties

Data

Gets or sets the data of the XRECORD, as AutoCAD's Data: its groups after the subclass marker AcDbXrecord and, from R2000 on, the cloning flag (280), up to its extended data; each text (codes 1 to 9 and 300 to 309) with its escapes (\U+00E9) read as letters.

Methods

Append(IEnumerable<DxfTypedValue>)

Adds groups at the end of the data, as AutoCAD's Append adds those of a result buffer; none changes nothing.

Erase()

Erases the XRECORD, as AutoCAD's Erase: it is taken out of the file, and the entry of the dictionary that names it with it.

GetEnumerator()

Gets an enumerator over the groups of the data, as AutoCAD's GetEnumerator.

ToString()

Gives the XRECORD as a line for debugging: its type, its handle and how many groups its data has.