ArcGIS Pro 2.7 API Reference Guide
CopyElements(IEnumerable<Element>) Method

ArcGIS.Desktop.Layouts Namespace > Layout Class > CopyElements Method : CopyElements(IEnumerable<Element>) Method
The elements to be copied
Copy the elements into the page layout. This method must be called on the MCT. Use QueuedTask.Run
Syntax
Public Overloads Function CopyElements( _
   ByVal elements As IEnumerable(Of Element) _
) As IReadOnlyList(Of Element)

Parameters

elements
The elements to be copied

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
elements must belong to a layout
elements must belong to layout 'URI'
Remarks
Only elements from a single page layout can be copied at one time. To copy elements from page layouts, CopyElements must be called each time.
If a group element is provided in the list of elements to be copied then the group element and all its children will be copied.
If a child of a group element is provided in the list in addition to its parent then the parent takes precedence (i.e. the entire group element is copied and not just that child).
If a child element of a group element is provided in the list but its parent is not then only the child element is copied. The parent of the copied element will become the target group element.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Layout Class
Layout Members
Overload List