2027 Method
Changes 0
M

ElementTransformUtils.CopyElement

Description:
Copies an element and places the copy at a location indicated by a given transformation.
public static ICollection<ElementId> CopyElement(
	Document document,
	ElementId elementToCopy,
	XYZ translation
)
  • document
    The document that owns the element.
  • elementToCopy
    The id of the element to copy.
  • translation
    The translation vector for the new element.
Return Value ICollection<ElementId> The ids of the newly created copied elements. More than one element may be created due to dependencies.
  • The element elementToCopy does not exist in the document -or- The input element is a Sketch member and there is no Sketch in the edit mode to place this element in.
  • A non-optional argument was null
  • It is not allowed to copy Sketch member to non-parallel sketch. -or- If we are not able to copy the element.