Table of Contents

Method Add

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Add(CadDocument, CadDesignCenterDrawing, CadDesignCenterKind, IEnumerable<string>)

Copies named items of a kind from a drawing into the document: a layer with its colour, linetype (copied too where the document has none), lineweight, transparency, state and description; a linetype with its dashes, texts and shapes; a text style with its font; a dimension, multileader or table style with the text styles, linetypes and blocks it draws by; a block definition with what it is drawn from; a layout with its viewports and objects, taking another name where the document has one of that name (Layout3-Plan), as the template command names it.

public static CadDesignCenterResult Add(CadDocument document, CadDesignCenterDrawing from, CadDesignCenterKind kind, IEnumerable<string> names)

Parameters

document CadDocument

The document the items come into.

from CadDesignCenterDrawing

The drawing they come from.

kind CadDesignCenterKind

The kind; Xrefs are attached, not copied, and are refused.

names IEnumerable<string>

The names of the items, as Items(CadDesignCenterKind) lists them.

Returns

CadDesignCenterResult

What was added, kept and what failed.

Exceptions

ArgumentNullException

Thrown when the document, the drawing or the names are null.