ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / GetMetadata Method
Example

In This Topic
    GetMetadata Method (Layout)
    In This Topic
    Gets the Layout metadata. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public string GetMetadata()
    Public Function GetMetadata() As String

    Return Value

    The xml formatted metadata
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Layout Metadata
    //var layout = ...;
    //Must be on the QueuedTask.Run()
    
    //Gets the Layout metadata.
    var layout_xml = layout.GetMetadata();
    //Can metadata be edited?
    if (layout.GetCanEditMetadata())
      //Set the metadata back
      layout.SetMetadata(layout_xml);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also