ArcGIS Pro 2.7 API Reference Guide
CanConvertMapFromItem Method (MapFactory)

ArcGIS.Desktop.Mapping Namespace > MapFactory Class : CanConvertMapFromItem Method
The map item to test
The type to convert the map item to
Test whether the map item can be converted to the specified output type. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public bool CanConvertMapFromItem( 
   MapProjectItem mapItem,
   MapConversionType convertTo
)
Public Function CanConvertMapFromItem( _
   ByVal mapItem As MapProjectItem, _
   ByVal convertTo As MapConversionType _
) As Boolean

Parameters

mapItem
The map item to test
convertTo
The type to convert the map item to

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
The following conversions are supported (the map referenced by the map item is tested): o Map -> Base map, Scene (Global), Scene (Local)
o BaseMap -> Map
o Scene (Global) -> Map
o Scene (Local) -> Map
Specifying an invalid conversion type will return false
Note: If MapConversionType.SceneGlobal is specified, if the map item's map spatial reference contains a vertical coordinate system, the VCS is checked to see if it is compatible with a global scene. If it is not, the method will also return false
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapFactory Class
MapFactory Members