ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / ExportMetadata Method / ExportMetadata(String,MDImportExportOption,MDExportRemovalOption) Method
Example

In This Topic
    ExportMetadata(String,MDImportExportOption,MDExportRemovalOption) Method
    In This Topic
    Export metadata. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    outputFilePath
    exportType
    removalOption
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Item: export the metadata of the currently selected item: ExportMetadata
    await QueuedTask.Run(() => metadataItemExport1.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCurrentMetadataStyle, MDExportRemovalOption.esriExportExactCopy));
    
    Item: export the metadata of the currently selected item: ExportMetadata
    await QueuedTask.Run(() => metadataItemExport1.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCurrentMetadataStyle, MDExportRemovalOption.esriExportExactCopy));
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also