ArcGIS Pro 2.7 API Reference Guide
GroupElements Method (Layout)

ArcGIS.Desktop.Layouts Namespace > Layout Class : GroupElements Method
The elements to be grouped.
Group the collection of elements. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public GroupElement GroupElements( 
   IEnumerable<Element> elements
)
Public Function GroupElements( _
   ByVal elements As IEnumerable(Of Element) _
) As GroupElement

Parameters

elements
The elements to be grouped.

Return Value

GroupElement containing the grouped elements
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
elements cannot be null or empty
elements must belong to layout 'URI'
element parents must be the same and non-null
Remarks
If any group elements are present in the input collection, they must have the same parent or a element parents must be the same and non-null will be thrown.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Layout Class
Layout Members