execute_arcpy_code
Execute custom Python code in ArcGIS Pro using arcpy for tasks not covered by predefined tools, such as managing layers, querying attributes, or exporting results.
Instructions
Execute arbitrary Python code inside ArcGIS Pro (arcpy is pre-imported; use arcpy.mp.ArcGISProject('CURRENT') for the open project). Use print() to return output. Use this when no dedicated tool covers the task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |