ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / GetCanEditMetadata Method
Example

In This Topic
    GetCanEditMetadata Method (Map)
    In This Topic
    Gets whether the Map metadata can be edited or not. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetCanEditMetadata() As Boolean
    public bool GetCanEditMetadata()

    Return Value

    True if the metadata is editable
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    Map metadata is typically always editable unless the underlying .aprx is not editable
    Example
    Get and Set Map Metadata
    {
        //Note: Run within a QueuedTask
        //Get map's metadata
        var mapMetadata = map.GetMetadata();
        //TODO:Make edits to metadata using the retrieved mapMetadata string.
    
        //Set the modified metadata back to the map.
        if (map.GetCanEditMetadata())
            map.SetMetadata(mapMetadata);
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also