Skip to content

Export Mermaid project-structure diagram and add arcgispro diagram command#15

Merged
danmaps merged 1 commit intomainfrom
codex/generate-mermaid-diagrams-for-arcgis-pro-structure
Feb 6, 2026
Merged

Export Mermaid project-structure diagram and add arcgispro diagram command#15
danmaps merged 1 commit intomainfrom
codex/generate-mermaid-diagrams-for-arcgis-pro-structure

Conversation

@danmaps
Copy link
Owner

@danmaps danmaps commented Feb 6, 2026

Motivation

  • Provide a machine-readable and human-friendly visualization of ArcGIS Pro project topology (maps, layers, layouts, map frames) to aid dependency tracing and AI-assisted analysis.
  • Surface diagram artifacts in the snapshot so diagrams are exported alongside existing JSON/Markdown outputs for use with tools like beautiful-mermaid.

Description

  • Add MapFrameInfo and a MapFrames collection to LayoutInfo so layouts capture both frame name and referenced map name (ProExporter/Models.cs).
  • Collect layout map frame metadata in the add-in so layout entries include map-frame → map mappings (ProExporter/ContextCollector.cs).
  • Generate Mermaid diagram files during serialization: snapshot/project-structure.mmd (Mermaid source) and snapshot/project-structure.md (Mermaid fenced markdown), and include them in the list of exported snapshot files (ProExporter/Serializer.cs).
  • Implement a BuildMermaidDiagram routine that emits a flowchart showing Project → Maps → Layers, group layer nesting, layout → map relationships via map frames, and visually highlights layers used in multiple maps (ProExporter/Serializer.cs).
  • Add a new CLI command arcgispro diagram that locates the Mermaid source and optionally renders images using beautiful-mermaid with --format and --renderer options (cli/arcgispro_cli/commands/diagram.py) and wire it into the CLI (cli/arcgispro_cli/cli.py).
  • Update arcgispro snapshot to report on existence of the generated diagram files and show them in the snapshot summary (cli/arcgispro_cli/commands/snapshot.py).
  • Document the new diagram outputs and command in the top-level README.md and cli/README.md.

Testing

  • No automated tests were run as part of this change.

Codex Task

@danmaps danmaps merged commit 72f38f9 into main Feb 6, 2026
5 checks passed
@danmaps danmaps deleted the codex/generate-mermaid-diagrams-for-arcgis-pro-structure branch February 6, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant