{"id":2698,"date":"2018-05-17T09:17:10","date_gmt":"2018-05-17T07:17:10","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=2698"},"modified":"2018-06-07T08:31:32","modified_gmt":"2018-06-07T06:31:32","slug":"sparx-systems-enterprise-architect-sql-to-get-the-start-end-coordinates-of-the-link-routing-with-customized-lines","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=2698","title":{"rendered":"Sparx Systems Enterprise Architect: SQL to get the start \/ end coordinates of the link connector routing with customized lines"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>A SQL-Statement is needed (here Access \/ .eap) that gets all Coordinate-, Routing- and Position information of links in a diagram of the Sparx Systems Enterprise Architect.<\/p>\n<h1>Approach<\/h1>\n<p>Data Mining and the Usage of <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=2375\" rel=\"noopener\" target=\"_blank\">MDB Plus<\/a><\/p>\n<h1>Solution<\/h1>\n<p>The link routing is diagram dependent. In the following diagram the diagram &#8222;PLM Framework&#8220; has been used. Further more the stereotype &#8222;BusinessProcess&#8220; is requested (you have to replace these String according to your needs.<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSELECT bp.&#x5B;Object_ID] as &#x5B;start_object_id],\r\n       bp.&#x5B;Name] as &#x5B;start_object_name],\r\n       tconn.&#x5B;Connector_ID] as &#x5B;conn_id],\r\n       tconn.&#x5B;Start_Edge] as &#x5B;conn_start_edge],\r\n       tconn.&#x5B;End_Edge] as &#x5B;conn_end_edge],\r\n       tconn.&#x5B;PtStartX] as &#x5B;conn_pt_start_x],\r\n       tconn.&#x5B;PtStartY] as &#x5B;conn_pt_start_y],\r\n       tconn.&#x5B;PtEndX] as &#x5B;conn_pt_end_x],\r\n       tconn.&#x5B;PtEndY] as &#x5B;conn_pt_end_y],\r\n       tconn.&#x5B;RouteStyle] as &#x5B;conn_route_style],\r\n       linkpath.&#x5B;Path] as &#x5B;conn_path],\r\n       bpdest.&#x5B;Object_ID] as &#x5B;end_object_id],\r\n       bpdest.&#x5B;Name] as &#x5B;end_object_name],\r\n       bp.&#x5B;Alias] as &#x5B;start_key],\r\n       bpdest.&#x5B;Alias] as &#x5B;end_key],\r\n       startobjcoord.x as &#x5B;start_obj_x],\r\n       startobjcoord.y as &#x5B;start_obj_y],\r\n       endobjcoord.x as &#x5B;end_obj_x],\r\n       endobjcoord.y as &#x5B;end_obj_y],\r\n       linkpath.Geometry as &#x5B;geometry] \r\nFROM\r\n((((( \r\n   SELECT Object_ID, &#x5B;Alias], Name \r\n   FROM t_object\r\n   WHERE Stereotype='BusinessProcess'\r\n)bp\r\nINNER JOIN \r\n(  SELECT &#x5B;Connector_ID],&#x5B;Start_Object_ID], &#x5B;End_Object_ID], &#x5B;Start_Edge], &#x5B;End_Edge], &#x5B;PtStartX], &#x5B;PtStartY], &#x5B;PtEndX], &#x5B;PtEndY], &#x5B;RouteStyle] \r\n   FROM &#x5B;t_connector] \r\n)tconn\r\nON tconn.&#x5B;Start_Object_ID]=bp.&#x5B;Object_ID])\r\nINNER JOIN \r\n( \r\n   SELECT Object_ID, &#x5B;Alias],Name \r\n   FROM  &#x5B;t_object] \r\n)bpdest ON tconn.&#x5B;End_Object_ID]=bpdest.Object_ID)\r\nINNER JOIN\r\n(\r\n  SELECT ConnectorID, Path, Geometry\r\n  FROM t_diagramlinks WHERE DiagramID IN (SELECT Diagram_ID FROM t_diagram WHERE Name='PLM Framework')\r\n) linkpath ON linkpath.&#x5B;ConnectorID]=tconn.&#x5B;Connector_ID])\r\nINNER JOIN\r\n(\r\n  SELECT objstart.Object_ID,\r\n         objstart.Alias,\r\n         diaobj.RectLeft As x,\r\n         diaobj.RectTop As y\r\n  FROM\r\n  ((\r\n      &#x5B;t_diagram] dia LEFT JOIN (Select Diagram_ID, Object_ID, RectLeft, RectTop from &#x5B;t_diagramobjects]) diaobj ON dia.&#x5B;Diagram_ID]=diaobj.&#x5B;Diagram_ID])\r\n                                  LEFT JOIN &#x5B;t_object] objstart ON objstart.&#x5B;Object_ID]=diaobj.&#x5B;Object_ID])\r\n  WHERE dia.Name='PLM Framework'\r\n  AND objstart.stereotype='BusinessProcess'\r\n) startobjcoord ON startobjcoord.&#x5B;Object_ID]=bp.&#x5B;Object_ID])\r\nINNER JOIN\r\n(\r\n  SELECT objstart.Object_ID,\r\n         objstart.Alias,\r\n         diaobj.RectLeft As x,\r\n         diaobj.RectTop As y\r\n  FROM\r\n  ((\r\n      &#x5B;t_diagram] dia LEFT JOIN (Select Diagram_ID, Object_ID, RectLeft, RectTop from &#x5B;t_diagramobjects]) diaobj ON dia.&#x5B;Diagram_ID]=diaobj.&#x5B;Diagram_ID])\r\n                                  LEFT JOIN &#x5B;t_object] objstart ON objstart.&#x5B;Object_ID]=diaobj.&#x5B;Object_ID])\r\n  WHERE dia.Name='PLM Framework'\r\n  AND objstart.stereotype='BusinessProcess'\r\n) endobjcoord ON endobjcoord.&#x5B;Object_ID]=bpdest.&#x5B;Object_ID]\r\n<\/pre>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D2698&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px;margin-top:5px;\"><\/iframe>","protected":false},"excerpt":{"rendered":"<p>Problem A SQL-Statement is needed (here Access \/ .eap) that gets all Coordinate-, Routing- and Position information of links in a diagram of the Sparx Systems Enterprise Architect. Approach Data Mining and the Usage of MDB Plus Solution The link routing is diagram dependent. In the following diagram the diagram &#8222;PLM Framework&#8220; has been used. &hellip; <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=2698\" class=\"more-link\"><span class=\"screen-reader-text\">Sparx Systems Enterprise Architect: SQL to get the start \/ end coordinates of the link connector routing with customized lines<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,10,11,28,43],"tags":[],"class_list":["post-2698","post","type-post","status-publish","format-standard","hentry","category-access","category-datenbanken","category-ms-sql-server","category-sparx-systems-enterprise-architect","category-sql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-Hw","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2698"}],"version-history":[{"count":3,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2698\/revisions"}],"predecessor-version":[{"id":2704,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2698\/revisions\/2704"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}