Table of Contents

Method Copy

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Copy<T>(IEnumerable<T>, GeoVector2)

Copies objects by a displacement, as COPY does with a displacement typed: two lines copied by (0, 50) leave the lines and add two lines 50 above them, on the layers of the lines they copy. A dimension copied with the line it is tied to is tied to the copy of the line. One undo step named COPY.

public IReadOnlyList<T> Copy<T>(IEnumerable<T> entities, GeoVector2 displacement) where T : DxfEntity

Parameters

entities IEnumerable<T>

The drawing's objects to copy.

displacement GeoVector2

The displacement of the copies, in the world; (0, 0) makes copies on the sources.

Returns

IReadOnlyList<T>

The copies, in the order the objects were given, each of the type of its source.

Type Parameters

T

The type of the objects given.

Exceptions

ArgumentNullException

Thrown when the list is null.

ArgumentException

Thrown when an object of the list is null, or the displacement is not finite.

InvalidOperationException

Thrown when an object is refused, as the remarks say.