ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMappableItem Interface / OnAddToMap Method / OnAddToMap(Map) Method
The map to which the item will be added.

In This Topic
    OnAddToMap(Map) Method
    In This Topic
    Add the item to the map.
    Syntax
    List<string> OnAddToMap( 
       Map map
    )
    Overloads Function OnAddToMap( _
       ByVal map As Map _
    ) As List(Of String)

    Parameters

    map
    The map to which the item will be added.

    Return Value

    The set of Uris for any data created.
    Remarks
    This method is typically called via the "Add Data" command, "Add Data from Path" command or if the item is dragged/dropped onto the map.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also