ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / PresentationPage Class / GroupElements Method
The elements to be grouped.

In This Topic
    GroupElements Method (PresentationPage)
    In This Topic
    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

    ArcGIS.Desktop.Layouts.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 a valid presentation page
    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 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also