Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Schludi on March 26, 2019, 02:27:55 am

Title: Correct connector endpoint coordinates using a SQL Query on the .eap-File (.mdb)
Post by: Schludi on March 26, 2019, 02:27:55 am
Hi!

I have to draw some EA diagrams using only the .eap file without an installed EA on the server. So i am opening it as MDB-File via ODBC.
I have problems to find out where to place the connectors end point.

I have searched several topics in this forum. I know there is the attribute t_diagramlinks.Geometry (with edge={1,2,3,4})  and the Attribute [t_connector].Start_Edge and the attribute [t_connector].End_Edge , which are attributes that determine the edge to which the line is connected.

The table [t_diagramlinks] with the attribute "Geometry" is diagram-dependent.
The table [t_connector] with the attributes [t_connector].Start_Edge and the attribute [t_connector].End_Edge is not diagram-dependent --> there could be connections that haven't been drawn on a diagram.

I know that the SX, SY, EX, EY of t_diagramlinks are coordinates relative to the origin of each node that is drawn on a diagram - however i have problem to place the endpoints on the diagram like it has been drawn in the Enterprise Architect - the end of the connector often is somewhere in the middle of the end node.

Questions

Current Situation:
"My Interpretation" is what my web app currently draws (this is a screenshot).

Target Situation:
"EA Interpretation" is what i would like to see in my web app --> I need the same picture like the EA.

Problem:
EX / EY sometimes is zero and isn't painting the end line to the edge. Here EDGE is 4 what means it starts on the left side.

Question:
How do i find out where to place the end point?

(https://i.imgur.com/YnIGql7.png)
Title: Re: How to get the edge of the end node using a SQL Query on the .eap-File (.mdb)
Post by: Geert Bellekens on March 26, 2019, 02:44:46 am
I don't have an answer for your question, but your query seems way too complicated.
Any reason why you are doing so many joins with subqueries instead of simply joining the tables?

Geert
Title: Re: How to get the edge of the end node using a SQL Query on the .eap-File (.mdb)
Post by: Schludi on March 26, 2019, 05:54:40 pm
Hi thanks for your reply. I guess i should delete this SQL Statement from the Question because it is not relevant for the answer :-).

The focus of my question is the displayed connector between the node "System Requirements" and "Applicable Standards". There is a bend/kink because t_diagramlinks.Path was filled - but that seems to work:

(https://i.imgur.com/Z6MZkZm.png)

Here is the same picture with coordinates:

(https://i.imgur.com/YH6UxCI.png)
Title: Re: How to get the edge of the end node using a SQL Query on the .eap-File (.mdb)
Post by: qwerty on March 26, 2019, 07:13:32 pm
Same here as on your SO question: What is your goal? To get the layout from "My Interpretation"? EA won't do that. It will always attach a connector to the rectangular frame of an element.

q.
Title: Re: How to get the edge of the end node using a SQL Query on the .eap-File (.mdb)
Post by: Schludi on March 26, 2019, 07:32:46 pm
Current Situation:
"My Interpretation" is what my web app currently draws (this is a screenshot).

Target Situation:
"EA Interpretation" is what i would like to see in my web app --> I need the same picture like the EA.

Problem:
I can not use EX/EY because sometimes it is zero like shown in the screenshot with the coordinates. So i do not know exactly where the endpoint is.
Title: Re: How to get the edge of the end node using a SQL Query on the .eap-File (.mdb)
Post by: qwerty on March 26, 2019, 07:51:02 pm
I tried to give an explanation of EA's rendering mechanism here on SO (https://stackoverflow.com/questions/55341368/enterprise-architect-how-to-get-the-edge-of-the-end-node-using-a-sql-query-on).

q.