ArcGIS Pro 3.7 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 Sub CopyMetadataFromItem( _
       ByVal sourceItem As Item _
    ) 
    public void CopyMetadataFromItem( 
       Item sourceItem
    )

    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");
      // Note: Needs QueuedTask to run
      metadataCopyFrom.CopyMetadataFromItem(featureClassItem);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also