ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Presentations Namespace / PresentationPage Class / DeleteElements Method / DeleteElements(IEnumerable<Element>) Method
The elements being removed

In This Topic
    DeleteElements(IEnumerable<Element>) Method
    In This Topic
    Deletes the elements from a presentation page. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void DeleteElements( 
       IEnumerable<Element> elements
    )
    Public Overloads Sub DeleteElements( _
       Optional ByVal elements As IEnumerable(Of Element) _
    ) 

    Parameters

    elements
    The elements being removed
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    elements must belong to a valid presentation page
    Remarks
    If elements is null then all elements are deleted.
    If a group element is provided in the list of elements to be deleted then the group element and all its children will be deleted.
    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 deleted and not just that child)
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also