Start from a model pattern
Goal
Import a model pattern that ships with EA, such as a cloud reference pattern, through XMI as the starting point for a diagram, then give its elements vendor icons. For a cloud or solution architect. You end with a package holding the pattern's elements and its diagram, checked by object count and by a render, with icons assigned where the pattern had placeholders.
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, and dismissing any dialog EA raises (you paste a screenshot of it into the conversation first). |
| VS Code with GitHub Copilot | Fully, except the UI steps, which you perform: starting EA and opening the model, and dismissing any dialog EA raises (you paste a screenshot of it into the conversation first). |
Before you start
- The start-of-session check done.
- The pattern file. EA installs model patterns as XMI files under its
ModelPatternsfolder, typically%ProgramFiles%\Sparx Systems\EA\ModelPatterns\. List the folder and choose from what is there. Different builds ship different files. - A new, empty package to import into. The import writes into the target package in place and is semi-destructive.
- To load icon artwork: a local file (
.qeaor.qeax). EA's automation interface has no way to reach the image library, so the server writes it directly. - A way to look at the result: the render the server returns, which you look at in the conversation, or EA's own window, which the AI looks at with computer use.
Several of EA's patterns are cloud reference diagrams, for example one of AWS instances. Importing one puts a ready-made diagram in your model, which you edit into your own. ea-import-export carries the import. Icons use ea-diagram-composition and the image operations.
In one pattern, the import brings the pattern's elements and its one diagram with exactly the 13 objects the pattern places, and the rendered diagram matches the reference closely in position and size. What the import does not bring is the artwork. The pattern's elements carry no image, so EA draws pale placeholder squares where the reference shows vendor glyphs. Icons are a second step.
Steps
- AI with computer use; otherwise you If EA is not running or the model is not open, start EA and open it. AI Power Tools
ea-start-hereruns the start-of-session check. - You Choose the pattern from the files
ea-import-exportfinds. - AI Power Tools
ea-modelingcreates an empty target package. - AI Power Tools
ea-import-exportimports the pattern (import_xmi). Leave the option that gives everything a fresh identity (strip_guid) on, so the import behaves as a copy. Importing with identities preserved into a model that already holds them is a collision, and EA does not fail cleanly: the request simply never returns. If nothing is created, the call reports an empty import and does not claim success. - AI Power Tools
ea-import-exportchecks the import: the diagrams in the package and a count of the diagram's objects. A pattern can hold elements it does not draw. - You Look at the rendered diagram and compare it with what the pattern should look like. Expect pale placeholder squares where vendor glyphs belong, no captions, and no vendor logo badge in a container's corner. That is the starting point, not a fault.
- You
ea-diagram-compositionsearches the icon libraries in your own EA install (find_icon, about 5,200 icons on EA 17.1 across AWS, Azure, Google and data-platform sets, with nothing downloaded) and shows the candidates. You choose among them. Do not match names automatically: a caption is not an icon name.Amazon S3 output bucketwantsAmazon Simple Storage Service (S3)orBucket with objects. Containers and labels such as a region or a tier never had an icon. Prefer the newest vintage. Say so when no icon fits, rather than substituting a near miss. - AI Power Tools
ea-diagram-compositionassigns each chosen icon to its placement (set_element_icon). It reuses the image if the model already holds it, and otherwise loads it first. Both the assignment and the loading are read back, so a success reply means the setting is stored. It does not mean EA rendered the picture. - You Render again and look at each icon.
Prompts to use
Opening
Follow-ups
Recommended models
| Model | Fit | Why |
|---|---|---|
| Claude Fable 5.1 | Recommended | Choosing the right icon concept, and judging the render |
| Claude Opus 5.5 | Recommended | The same |
| Claude Sonnet 5.5 | Capable | Reliable for the import. Icon judgment needs a look from you |
| Claude Haiku 4.5 | Not recommended | Visual judgment dominates |
Ratings are guidance based on the kind of reasoning the skill needs, not measured benchmarks.
Checking the result
- Accurate. The imported diagram's object count equals the count the pattern places. In the render, elements sit where the pattern puts them. Each assigned icon is the right concept for its element, judged by looking, not by a success reply.
- Complete. Every element that should carry an icon has one, or the report says which ones have none and why. Containers and labels that never had an icon are named as such.
- Nothing unintended changed. The import went into a new package. Comparing the model with a baseline, or counting the rest of the model, shows nothing else moved. The image list shows only the images you meant to add.
Variations
- Azure. An Azure pattern gives the best match: every icon present and matching in kind and color, and the layout and containers matching. The gap is captions.
- Data-platform icon sets. The same two steps apply, with the provider set to data platform in the search.
- Use the pattern as a base. Replace the pattern's placeholder elements with your own. Tidy and restyle using Tidy and style a diagram.
- Cloud diagrams in general. See Draw a cloud architecture diagram with vendor icons.
Limitations
- Captions are not drawn under image elements in the exported PNG, whether or not the caption setting is on.
- AWS style differs from the reference. The reference uses dark tiles or outlines with the name inside. The icons loaded are colored images. The asset is right, and the difference is in how it is drawn.
- Vendor logo badges are not reproduced. A badge in a container's corner is part of the container, not a separate element, and setting an image on the container would replace the container. The Google Cloud logo accepts an image, but the library's version is the bare hexagon, stretched into the slot without the wordmark.
- Google Cloud-stereotyped elements were reported to render as a colon and text, without the hexagon glyph, even with the technology loaded.
- Stored geometry is not always where EA draws. In one import, three of thirteen elements were drawn 26 to 34 pixels lower than their stored rectangles. A check that compares stored rectangles to a reference can call a faithful diagram drifted, and the reverse. Judge by a render.
- A wrong or glyph-less match is possible. One icon in the libraries named for a key is a document with a key and a padlock, not a plain key. Some glyphs are not in the libraries at all.