archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
951 stars 269 forks source link

Include sourceAttachment, targetAttachment in diagram connection elements in Export model to Open Exchange XML file #1037

Open oswalds opened 6 months ago

oswalds commented 6 months ago

The xml export of diagrams in a model to an Open Exchange XML file does not contain attachment points for connections. An import into another tool causes the diagram to be rendered using default connections to the "center" of an element which requires a lot of cleanup. Adding source/target attachment points for connections (without bendpoints) fixes the issue of rendering properly in the other tool. Diagram as rendered by Archi that is exported: archiDiagram

Diagram as rendered when imported by another ArchiMate tool using current export method (export file: testXMLExport_woAtt.txt): existingImportResult

Diagram as rendered imported by another ArchiMate tool using suggested method of adding attachment points (export file: testXMLExport.txt): improvedImportResult

Here are some snippets from classes in the code base showing how I addressed the issue: IXMLExchangeGlobals.txt XMLModelExporter.txt DiagramModelUtils.txt

jbsarrodie commented 6 months ago

Hi,

That's something which have been on my todo list for some years now. Thank you for sharing this code samples, but unfortunately they don't take Archi configuration into account (user can opt-out from orthogonal anchors), and don't work on rounded rectangle.

The real solution to that is to rely on orthogonal anchors code to get the read anchor point position.

I'll look at it when coArchi2 will be released.

Regards