ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / GroupElement Class / GetElementsAsFlattenedList Method
Example

In This Topic
    GetElementsAsFlattenedList Method (GroupElement)
    In This Topic
    Get the collection of Element from the group element as a flattened list. Nested groups within child GroupElement are not preserved.
    Syntax
    Public Function GetElementsAsFlattenedList() As IReadOnlyList(Of Element)
    public IReadOnlyList<Element> GetElementsAsFlattenedList()

    Return Value

    Example
    Children in a Group Element
    {
      // Nested groups within ArcGIS.Desktop.Layouts.GroupElement are not preserved.
      var children = groupElement.GetElementsAsFlattenedList();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also