Method Add
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Add(DxfDatabase, DxfDatabase, IReadOnlyList<string>, IReadOnlyList<string>, IReadOnlyList<string>, IReadOnlyList<string>)
Copies the named text styles, linetypes, blocks (each with its objects) and dimension styles of another drawing into a
drawing, in that order, so that a dimension style points at the text style and the blocks the drawing then has: the
way the library merges the tables of a drawing it inserts, but only the records named, so that the defaults a small
drawing is made with (ISO-25) are not added to a drawing that lacks them. Each name is of a record the source
has and the drawing has not. Writes no record of the edit: the caller's CadEditScope does.
public static void Add(DxfDatabase database, DxfDatabase source, IReadOnlyList<string> textStyles, IReadOnlyList<string> linetypes, IReadOnlyList<string> blocks, IReadOnlyList<string> dimensionStyles)
Parameters
databaseDxfDatabaseThe drawing the records go into.
sourceDxfDatabaseThe drawing they are copied from.
textStylesIReadOnlyList<string>The names of the text styles.
linetypesIReadOnlyList<string>The names of the linetypes.
blocksIReadOnlyList<string>The names of the blocks.
dimensionStylesIReadOnlyList<string>The names of the dimension styles.
Exceptions
- ArgumentNullException
Thrown when a drawing or a list is null.
- ArgumentException
Thrown when a name is of a record the source has not, or of one the drawing has.