ElementTransformUtilsMirrorElements Method |
Mirrors a set of elements about a given plane.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static IList<ElementId> MirrorElements(
Document document,
ICollection<ElementId> elementsToMirror,
Plane plane,
bool mirrorCopies
)
Public Shared Function MirrorElements (
document As Document,
elementsToMirror As ICollection(Of ElementId),
plane As Plane,
mirrorCopies As Boolean
) As IList(Of ElementId)
public:
static IList<ElementId^>^ MirrorElements(
Document^ document,
ICollection<ElementId^>^ elementsToMirror,
Plane^ plane,
bool mirrorCopies
)
static member MirrorElements :
document : Document *
elementsToMirror : ICollection<ElementId> *
plane : Plane *
mirrorCopies : bool -> IList<ElementId>
Parameters
- document Document
-
The document that owns the elements.
- elementsToMirror ICollectionElementId
-
The set of elements to mirror.
- plane Plane
-
The mirror plane.
- mirrorCopies 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
IListElementId
A collection of ids of newly created elements - mirrored copies. It is empty if the mirrorCopies arguments is false.
ExceptionsException | Condition |
---|
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.
-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.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
Thrown when the elements cannot be moved (e.g. due to some of the elements being pinned).
|
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.
See Also