ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Reports Namespace / Report Class / DeleteElements Method
The set of elements to be deleted.
Example

In This Topic
    DeleteElements Method (Report)
    In This Topic
    Deletes the set of elements from the report. Note that section elements cannot be deleted and will be ignored if specified. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void DeleteElements( 
       IEnumerable<Element> elements
    )
    Public Sub DeleteElements( _
       ByVal elements As IEnumerable(Of Element) _
    ) 

    Parameters

    elements
    The set of elements to be deleted.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    The value cannot be null: elements
    Remarks
    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)
    Example
    Delete Elements
    QueuedTask.Run(() => report.DeleteElements(textReportElements));
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also