ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Core Namespace / Item Class / CopyMetadataFromItem Method
Example

In This Topic
    CopyMetadataFromItem Method (Item)
    In This Topic
    Copy metadata from Item. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void CopyMetadataFromItem( 
       Item sourceItem
    )
    Public Sub CopyMetadataFromItem( _
       ByVal sourceItem As Item _
    ) 

    Parameters

    sourceItem
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Item: Copy metadata from the source item's metadata: CopyMetadataFromItem
    Item featureClassItem = ItemFactory.Instance.Create(@"C:\projectAlpha\GDBs\regionFive.gdb\SourceFeatureClass");
    await QueuedTask.Run(() => metadataItemImport.CopyMetadataFromItem(featureClassItem));
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also