Giving AI Context for ArcGIS Pro Projects

By Philip MartyJuly 23, 20262 min read

One of the biggest challenges when using AI tools with ArcGIS Pro is that the AI has no inherent visibility into your project. It cannot see your geodatabase schema, layouts, map frames, or project structure unless you explicitly provide that information.

A simple ArcPy "project dump" script can bridge that gap by exporting key project metadata into a text file. Use the various ArcPy ‘List’ functions (ListFeatures, ListFields, ListLayouts, etc) to inventory feature classes, fields, data types, spatial references, layouts, and layout elements. Then package everything into an AI-readable document. Instead of manually describing your project, you can hand the generated file to an AI assistant and immediately provide the context needed to answer questions, troubleshoot issues, or generate ArcPy code.

If you need help getting started, try this:
AI Prompt:

Create an ArcPy script that scans the currently open ArcGIS Pro project and generates a text-based project inventory. Include project information, geodatabase schema, feature classes, fields, maps, layers, layouts, and layout elements. Output the results as a human-readable document that can be shared with AI coding assistants for project context.

Run the resulting code out of your Pro python window, or enter the project .aprx path in place of “CURRENT” and run out of any python window. You can then import that file into an LLM to help you write code or expressions regarding your project. To scale further, execute your python code out of a coding platform like Cursor, Codex, or Claude and create a durable skill for accessing your GIS projects. Building this functionality enables you to scale GIS integrations into all manner of python workflows.

 

In a recent project, I needed to calculate the distance between point features and a route polyline as part of a larger Python pipeline that runs on a regular schedule. From the GIS side, all I really needed was a simple output: miles by Point ID from a Near geoprocessing step. In the old workflow, getting that single result could be surprisingly clunky: open or build an ArcGIS Pro project, bring in the data, run the geoprocessing tool, export the results to CSV, pull the file back into pandas, and then wire it into the rest of the pipeline. The alternative was hand-writing Python that was tightly coupled to a specific .aprx, layer names, field names, and data paths.

With a project-aware AI workflow, that process becomes much more seamless. Instead of translating every GIS detail into code by hand, I can describe the intent in plain language: “access the .aprx file, pull the Routes layer from the SDE connection, run a Near analysis against Points, return Point ID and distance as a pandas dataframe, and join it directly into my pipeline here…” The heavy lifting is supported by the Python skill that exposes the project, SDE connection, layers, and fields to the AI, so it can understand the context and build the integration around it.

  

With AI, it’s easier than ever to write and pull off complex python pipelines or troubleshoot problems. This is an efficient way to give AI eyes to your GIS projects, layers, and data, so that you can spend more time building solutions and less time describing the inputs.

Related Articles