ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / DeleteMetadataContent Method
Example

In This Topic
    DeleteMetadataContent Method (Project)
    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, Windows 8.1

    See Also