add_layer_to_map
Add a GIS dataset (feature class, raster, table) as a layer to a specific map within an ArcGIS Pro .aprx project. Supports saving the project after addition.
Instructions
Add a dataset to a map inside a saved ArcGIS Pro .aprx project using arcpy.mp addDataFromPath. Use this to load feature classes, rasters, tables, or other supported GIS datasets into an existing project map before styling, exporting, or layout automation. Operates on the saved .aprx file, not a live ArcGIS Pro session, and saves the project when save=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "add_layer_to_map"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||