AI Power Tools for Sparx EA Docs Release 3.6.4

Move content in and out of Enterprise Architect

Goal

Export a package as XMI (or import XMI back), export a diagram as a picture or an editable Visio file, or generate a formatted document, and know what each of four ways of moving content gives you and what it does not. This is for an architect handing content to another repository, to a stakeholder without an EA license, or to a document. You end with the file you need, and evidence that it contains what it should.

Where it runs

This scenario needs the MCP server. Computer use covers its UI steps.

Surface How it runs
Claude Code Fully
Claude Cowork Fully
Claude Desktop chat Fully, except the UI steps, which you perform: starting EA and opening the model, handling any dialog EA raises (you screenshot it, paste the screenshot into the conversation so the assistant can analyze it, then dismiss it), and creating a report template in EA's Resources window if you want a specific layout.
VS Code with GitHub Copilot Fully, except the UI steps, which you perform: starting EA and opening the model, handling any dialog EA raises (you screenshot it, paste the screenshot into the conversation so the assistant can analyze it, then dismiss it), and creating a report template in EA's Resources window if you want a specific layout.

The four ways content moves

Need Operation Output
A package into another repository, or a tool that reads XMI export_xmi, import_xmi (Import and export) An XMI file
A picture of a diagram for a document, wiki or chat get_diagram_png, get_diagram_svg, export_diagram_image (Exporting) PNG, SVG, or another image format
A diagram for a stakeholder who has Visio but not EA and wants to move boxes export_diagram_to_visio A .vsdx file
A formatted document (headings, tagged values, prose) generate_report An RTF document from an EA report template

Two more things leave EA as something other than a file. get_diagram_manifest and get_package_manifest give another tool everything it needs to redraw a diagram with each shape tied to its element (Reading a diagram or a package as a manifest). The description operations write plain-language text into a diagram's notes (Diagram descriptions). ea-import-export covers both.

Each operation checks its own output where it can, but a status of "exported" or "generated" is not proof that the content is right. This scenario's steps are mostly about verification.

Before you start

  • EA is running with the model open (preflight).
  • A destination folder you can write to. The operations create a missing parent folder.
  • For import: a baseline of the target package (Protect a change with a baseline). Import changes the target in place.
  • For a report: a report template defined in the project, if you want a specific layout. Templates are created in EA's own interface (the Resources window); with computer use the assistant can create one there, otherwise you do.

Steps

  1. AI with computer use; otherwise you If EA is not running or the model is not open, start EA and open it. AI ea-start-here and ea-import-export run the preflight and work out what leaves or enters EA, and for whom. You state the purpose and audience.
  2. AI Power Tools XMI export: ea-import-export exports the package, then checks the file against the package.
  3. AI Power Tools XMI import: ea-change-management takes a baseline of the target, ea-import-export imports the file, and the assistant counts what arrived. You approve the import.
  4. AI Power Tools Diagram picture: ea-import-export renders the diagram as PNG, SVG or another image format.
  5. AI Power Tools Editable Visio file: ea-import-export exports the diagram to .vsdx.
  6. AI Formatted document: ea-import-export discovers the report templates the project holds, then generates the report from the one you choose. You choose the template.
  7. AI ea-import-export checks the output, and checks it for identifying content before it leaves the team. You release the file.

Step 2, XMI export. The format is one of XMI 1.0, 1.1, 1.2, 2.1 (the default), 2.4.1 and 2.5.1; anything else returns an error listing the supported formats. The server reads the file back and checks that it is XMI and that the package's element names appear in it. A wrong-format file or a file with none of the package's elements is reported as a failed export and is not a usable backup. On success the response gives the element count in the package and the element count found in the export; compare them yourself, because the habit is what catches a bad export. Do not assume diagram layout is in the file; check a package whose diagrams matter.

Step 3, XMI import. By default the import gives everything fresh identifiers, so it behaves as a copy, and it includes diagrams. Leave the fresh-identifier default on. Importing with the original identifiers into a model that already holds them is a collision, and EA does not fail cleanly: the call never returns. Original identifiers are safe only when restoring into a repository that does not hold them. The response reports how many items were created (elements plus child packages directly under the target, counted before and after); if nothing arrived it reports an empty import instead of a false success. Count back what arrived.

Step 4, pictures. The PNG and SVG operations return the picture inline and write it to the path you give. The general image operation writes to a path and supports PNG, EMF, SVG, JPG, BMP, GIF, TIF and TGA. All three render the diagram as EA draws it. Ask for a refresh if the diagram may have changed out of band (a direct database edit, another session) since the last render, or you may get a stale image. The image takes the diagram's size: a very wide diagram produces a very wide image. SVG scales and embeds better than PNG in documents. Do not use the diagram inspection operation as an export route: its preview lands in the server's cache folder, not where you intend.

Step 5, Visio. The .vsdx has one editable rectangle per element, labeled with name and stereotype, and one connector per relationship. The response reports the shape count, the connector count and the page size; compare the counts with the diagram. Every element is a plain rectangle whatever its type, connectors are straight lines between element centers with no bends, and the page follows the diagram's canvas, not a paper size. Re-skin in Visio, and check the page size before printing.

Step 6, documents. The assistant first asks the model for the report templates it holds, so the choice is real. Cautions when generating a document:

  • The output is RTF. An HTML output was reported to fail on a project with no custom templates, so ask for RTF.
  • A name that matches no template does not fail. On a project with no custom templates, unrelated names all produced the same default document. "Generated" means a file was written, not that your template was used; open the output and check its heading.
  • Never ask for an empty template name. It was reported to hang the call. EA itself stayed responsive.
  • The report embeds each element's created and modified author verbatim: the modeler's own EA or Windows login. Review before sharing outside the team.

Prompts to use

Opening:

Follow-ups:

  • Import: "Baseline the target package, import the file there, and count what arrived against what we exported."
  • Picture: "Give me the application landscape diagram as an SVG I can embed. Refresh it first; someone else edited it."
  • Visio: "Our reviewer only has Visio. Export that diagram and tell me what they will and won't be able to do with it."
  • Document: "List the report templates this project has, generate the package report from the right one, and check the output used that template."
Model Fit Why
Claude Fable 5.1 Capable The operations are deterministic; choosing the right export and checking the result is light judgment
Claude Opus 5.5 Capable Same
Claude Sonnet 5.5 Recommended Procedural and driven by AI Power Tools operations
Claude Haiku 4.5 Capable Fine for single exports; check that it does the verification step

Ratings are guidance based on the kind of reasoning the scenario needs, not measured benchmarks.

Checking the result

  • Correct. XMI: the element count in the export equals the count in the package, and the file declares the XMI version you asked for. Visio: the shape and connector counts match the diagram, and the file opens. Image: it shows the diagram as it looks in EA. Document: the heading and layout are those of the template you named, not the default. Red flag: "generated" with no check of the template.
  • Complete. For XMI, remember the diagram-content question in step 2. For import, the items-created figure plus your own count shows what arrived, nested packages included. For Visio, the response counts are your completeness check.
  • Nothing unintended changed. Exports are read-only. After an import, a baseline comparison shows only additions in the target package.

Variations

  • Between repositories. Export from one, open the other, import there. A package with diagrams in it deserves a check that the diagrams arrived (Start from a model pattern imports a shipped pattern the same way).
  • A stakeholder without EA or Visio. SVG or PNG into a document.
  • A document for an audience you do not control. Strip or review the author fields first.

Limitations

  • Check counts, not status. The XMI operations verify their own output, but a status of "exported" or "imported" is still not proof that the content is right. Compare the counts.
  • XMI is not a backup of record. Use a baseline for protection inside the repository. A failed export is reported as an error, but a package whose diagrams matter should be checked.
  • For a profile (MDG source) package, XMI is not a substitute for copying the package (Copy a package as new). It does not dependably strip identifiers for that purpose, and two packages claiming the same profile id is worse than a manual copy.
  • Report templates are authored in EA's interface (by the assistant with computer use, otherwise by you), and an unknown template name silently falls back to the default document.
  • The Visio export is a starting point, not a faithful reproduction: plain rectangles and straight connectors.
  • A call that appears to hang is usually a dialog box in EA. With computer use, the assistant sees the dialog in EA's window, reads it, uses the message to correct the call, dismisses the dialog and keeps going. Without computer use, you take a screenshot of the dialog and paste it into the conversation so the assistant can analyze it, then you dismiss the dialog so processing can continue.