ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMapFactory Interface / CopyMap Method
The map to be copied

In This Topic
    CopyMap Method (IMapFactory)
    In This Topic
    Copies the input map and adds it to the project. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Map CopyMap( 
       Map map
    )
    Function CopyMap( _
       ByVal map As Map _
    ) As Map

    Parameters

    map
    The map to be copied

    Return Value

    Map
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    The map is null.
    Remarks
    Use FrameworkApplication.Panes.CreateMapPaneAsync(mapCopy) to activate the newly copied map (if needed)
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also