ElementTransformUtilsMoveElements Method |
Moves a set of elements by a given transformation.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static void MoveElements(
Document document,
ICollection<ElementId> elementsToMove,
XYZ translation
)
Public Shared Sub MoveElements (
document As Document,
elementsToMove As ICollection(Of ElementId),
translation As XYZ
)
public:
static void MoveElements(
Document^ document,
ICollection<ElementId^>^ elementsToMove,
XYZ^ translation
)
static member MoveElements :
document : Document *
elementsToMove : ICollection<ElementId> *
translation : XYZ -> unit
Parameters
- document Document
-
The document that owns the elements.
- elementsToMove ICollectionElementId
-
The set of elements to move.
- translation XYZ
-
The translation vector for the elements.
ExceptionsException | Condition |
---|
ArgumentException |
The given element id set is empty.
-or-
One or more elements in elementsToMove do not exist in the document.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
If we are not able to move all the elements (for example, if one or more elements is pinned).
-or-
Move operation failed.
|
See Also