Parsing .archimate files and generating SVG

Started by jarzebina, July 15, 2021, 09:23:34 AM

Previous topic - Next topic

jarzebina

We'd like to use .archimate models created by Archi in a Spring Boot opensource project. We need an operation to parse archimate models and generate SVG. Are there any libraries to do this? In which Maven repository can we find them? Or perhaps is it possible to publish them from https://github.com/archimatetool/archi project? Can Eclipse-RCP plugins be used in a web project without Eclipse-RCP dependencies? Thank you in advance.

Phil Beauvoir

#1
If you want to generate SVG diagrams from *.archimate files outside of Archi you'll find it difficult.

Archi's SVG generation works like this:

1. Load the model into the EMF (Eclipse Modelling Framework) the create a GEF (Graphical Eclipse Framework) / Draw2d GraphicalViewer with EditParts and Figures
2. Get the root printable Figure layer
3. Draw this Figure onto a Graphics instance in order to convert to SVG via Batik and other libraries

You'll need all of the Archi code and its Eclipse dependencies to do this.

Take a look here - https://github.com/archimatetool/archi/tree/master/com.archimatetool.export.svg

Another potential option is to use jArchi which can run standalone via the ACLI and that could generate SVG files from models. However, we haven't implemented the SVG exporter in jArchi until the next version.

Another possibility is to generate SVG diagrams from a model that is in the Open Exchange Format. Of course, you'd have to write your own parser and generator but it can be done and some people have done this.

Short answer - there are no standalone libraries.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.