Table of Contents

Method AddRecords

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

AddRecords(DxfDatabase)

Queues the table records and the blocks of a drawing of yours to be added to the drawing when CommitChanges() is called: its text styles, linetypes, blocks (each with its objects) and dimension styles that the small drawing of the commit has none of the name of, as Insert(GeoTransform3, DxfDatabase, bool) merges them. They are written before the layers and the objects of the commit, so that a layer can have the linetype, and an object the style or block, that the same commit adds. A record of a name the app's drawing has already is the app's own, as a merge keeps it, and the one given is left out. The records are copied now, so changing them afterwards changes nothing.

public void AddRecords(DxfDatabase records)

Parameters

records DxfDatabase

A drawing of your own, made in code, whose model space holds no object.

Remarks

A text style of new DxfDatabase("AC1027") given the name NOTE and the font romans.shx, added to that drawing's TextStyleTable, then given here, is the text style NOTE in the app after the commit.

Exceptions

ArgumentNullException

Thrown when the drawing is null.

ArgumentException

Thrown when the model space of the drawing holds an object, or the drawing is one this call cannot take.