2027 Method
Changes 0
M

ElementTransformUtils.MirrorElements

Description:
Mirrors a set of elements about a given plane.
Remarks:
Optionally, copies of the elements can be created prior to the operation and mirroring is then performed on the copies instead of the original elements.
public static IList<ElementId> MirrorElements(
	Document document,
	ICollection<ElementId> elementsToMirror,
	Plane plane,
	bool mirrorCopies
)
  • document
    The document that owns the elements.
  • ICollection<ElementId>
    elementsToMirror
    The set of elements to mirror.
  • plane
    The mirror plane.
  • Boolean
    mirrorCopies
    True if mirroring should be performed on copies of the elements, leaving the original elements intact. False if no copies should be created and the elements should be mirrored directly.
Return Value IList<ElementId> A collection of ids of newly created elements - mirrored copies. It is empty if the mirrorCopies arguments is false.
  • elementsToMirror cannot be mirrored. -or- The given element id set is empty. -or- One or more elements in elementsToMirror do not exist in the document. -or- Some of the elements cannot be copied, because they belong to different views. -or- The input set of elements contains Sketch members along with other elements or there is no active Sketch edit mode.
  • A non-optional argument was null
  • Thrown when the elements cannot be moved (e.g. due to some of the elements being pinned).