CopyTo

ElementId CopyTo(this Element element, XYZ target, View? view = null)

Copies an element to a new insertion point in the same document by applying a pure translation.

Parameters

  • elementElement

    The element to copy.

  • targetXYZ

    Target position for representative point.

  • viewView?

    Optional view context for centroid fallback.

Returns: The id of the new copy, or ElementId.InvalidElementId if failed.

Example

ElementId newId = element.CopyTo(new XYZ(10, 0, 0));