ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / FlattenLayers Method
The set of layers to flatten.

In This Topic
    FlattenLayers Method
    In This Topic
    Gets an enumeration of layers. Removes group layers and recurses their sublayers to add them to the list.
    Syntax
    public static IEnumerable<Layer> FlattenLayers( 
       IEnumerable<Layer> layers
    )
    Public Shared Function FlattenLayers( _
       ByVal layers As IEnumerable(Of Layer) _
    ) As IEnumerable(Of Layer)

    Parameters

    layers
    The set of layers to flatten.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also