create a bendpoint from XML model

Started by TNT44, September 20, 2023, 20:42:15 PM

Previous topic - Next topic



I start from an XML file , like
 <connection xsi:type="Relationship" identifier="_NS6Y8012Ee6qGLTIMz0B_A" source="_NS5x4k12Ee6qGLTIMz0B_A" target="_NS6Y8U12Ee6qGLTIMz0B_A" relationshipRef="_SMARTEA_8BRKeQo5pzsG8HnwQ4V3Kg">
            <lineColor b="0" g="0" r="0"></lineColor>
            <font size="9">
              <color b="0" g="0" r="0"></color>
          <bendpoint x="180" y="219"></bendpoint>
          <bendpoint x="193" y="219"></bendpoint>

It contains .. elements like

 <node xsi:type="Element" identifier="_NS5x4k12Ee6qGLTIMz0B_A" h="41" w="141" x="110" y="264" elementRef="_3OYUU_e1EeyrsMc33G4YQw">
              <lineColor b="136" g="136" r="136"/>
              <fillColor b="52" g="226" r="138"/>
              <font size="9" style="bold">
                <color b="40" g="40" r="40"/>

how to create a bendpoint .. ? like

// New bendpoint 2
var bp2 = {
    startX: 100,
    startY: 100,
    endX: 20,
    endY: 30

thanks ..

Phil Beauvoir

Looks like you have an XML exchange format file with bend-points. The XML exchange format uses absolute co-ordinates whereas Archi and jArchi use relative co-ordinates. I can't remember how to convert from absolute to relative, maybe someone else has already done that?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.