public void DeleteElements( IEnumerable<Element> elements )
Public Overloads Sub DeleteElements( _ Optional ByVal elements As IEnumerable(Of Element) _ )
Parameters
- elements
- The elements being removed
public void DeleteElements( IEnumerable<Element> elements )
Public Overloads Sub DeleteElements( _ Optional ByVal elements As IEnumerable(Of Element) _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
System.ArgumentException | elements must belong to layout 'URI' |
//on the QueuedTask var elementsToRemove = layout.GetSelectedElements(); layout.DeleteElements(elementsToRemove);
//Delete an element or elements on a layout. //Perform on the worker thread QueuedTask.Run(() => { //Delete a specific element on a layout aLayout.DeleteElement(elm); //Or delete a group of elements using a filter aLayout.DeleteElements(item => item.Name.Contains("Clone")); //Or delete all elements on a layout aLayout.DeleteElements(item => true); });
Target Platforms: Windows 11, Windows 10, Windows 8.1