MirrorElements Method (Document, ICollection(ElementId), Plane, Boolean)

Mirrors a set of elements about a given plane.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: (17.0.484.0)
Since: 2016


public static IList<ElementId> MirrorElements(
	Document document,
	ICollection<ElementId> elementsToMirror,
	Plane plane,
	bool mirrorCopies
Visual Basic
Public Shared Function MirrorElements ( _
	document As Document, _
	elementsToMirror As ICollection(Of ElementId), _
	plane As Plane, _
	mirrorCopies As Boolean _
) As IList(Of ElementId)
Visual C++
static IList<ElementId^>^ MirrorElements(
	Document^ document, 
	ICollection<ElementId^>^ elementsToMirror, 
	Plane^ plane, 
	bool mirrorCopies


Type: Autodesk.Revit.DB Document
The document that owns the elements.
Type: System.Collections.Generic ICollection ElementId
The set of elements to mirror.
Type: Autodesk.Revit.DB Plane
The mirror plane.
Type: System Boolean
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

A collection of ids of newly created elements - mirrored copies. It is empty if the mirrorCopies arguments is false.


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.


Exception Condition
Autodesk.Revit.Exceptions ArgumentException 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.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Thrown when the elements cannot be moved (e.g. due to some of the elements being pinned).

See Also