ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / SetUseSourceMetadata Method
True to use the underlying source object's metadata

In This Topic
    SetUseSourceMetadata Method (Layer)
    In This Topic
    Sets whether or not the Layer will use its own metadata or the metadata from its underlying source (if it has one). This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public override void SetUseSourceMetadata( 
       bool useSource
    )
    Public Overrides Sub SetUseSourceMetadata( _
       ByVal useSource As Boolean _
    ) 

    Parameters

    useSource
    True to use the underlying source object's metadata
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Attempting to set the UseSourceMetadata for GroupLayer is ignored. Sub layer types do not support metadata. They typically have a single source, specified on the parent layer, that controls the metadata.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also