Copies a set of elements and places the copies at a location indicated by a given translation.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since:
2012
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
-
Type:
Autodesk.Revit.DB
Document
The document that owns the elements.
- elementsToCopy
-
Type:
System.Collections.Generic
ICollection
ElementId
The set of elements to copy.
- translation
-
Type:
Autodesk.Revit.DB
XYZ
The translation vector for the new elements.
Return Value
The ids of the newly created copied elements.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The given element id set is empty. -or- One or more elements in elementsToCopy do not exist in the document. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions InvalidOperationException | If we are not able to copy all the elements. |