ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMapFactory Interface / CreateMapFromItem Method
An ArcGIS.Desktop.Core.Item
Version

CreateMapFromItem Method (IMapFactory)
Creates a new Map in the project using an item e.g. webmap, mxd etc. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Map CreateMapFromItem( 
   Item item
)

Parameters

item
An ArcGIS.Desktop.Core.Item

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
You should always check using MapFactory.CanCreateMapFrom() method before passing an item to this method.
To open a map, use ProApp.Panes.CreateMapPaneAsync method.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also