set_map_extent_from_layer
Set a map frame extent to match a layer's extent, focusing the layout on a specific dataset or boundary before export.
Instructions
Set a layout map frame extent to match a named layer using mf.getLayerExtent and mf.camera.setExtent. Use this before exporting a layout so the final map focuses on a dataset, study area, boundary, or analysis result. This changes the map frame camera and saves the .aprx project when save=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||