ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Core Namespace / Item Class / DeleteMetadataContent Method
Example

In This Topic
    DeleteMetadataContent Method (Item)
    In This Topic
    Delete certain content from the metadata of the current item. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void DeleteMetadataContent( 
       MDDeleteContentOption deleteOption
    )
    Public Sub DeleteMetadataContent( _
       ByVal deleteOption As MDDeleteContentOption _
    ) 

    Parameters

    deleteOption
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Item: Delete certain content from the metadata of the current item: DeleteMetadataContent
    Item featureClassWithMetadataItem = ItemFactory.Instance.Create(@"C:\projectBeta\GDBs\regionFive.gdb\SourceFeatureClass");
    //Delete thumbnail content from item's metadata
    await QueuedTask.Run(() => featureClassWithMetadataItem.DeleteMetadataContent(MDDeleteContentOption.esriMDDeleteThumbnail));
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also