3
votes

I have created 15 sequence diagrams using Sparx Enterprise Architect. My client wants these diagrams in Visio only. Is there any tool to convert already created EA diagrams to Visio?

1
Please ask only one question per question. Stack Overflow is not a forum, it's a Q&A site, and each question should be separate in order to help future users.Uffe

1 Answers

0
votes

If your EA instance is on MS SQL Server you can export the shape data from Sparx EA and then import to Visio using the data visualizer (Excel import)

Query to extract:

--Create temp table of Swimlanes
WITH t_object_CTE (Object_ID, Swimlane)
AS (SELECT t_object.Object_ID, 
           Name
    FROM t_object
    WHERE Stereotype = 'Pool')

SELECT 
    do.Object_ID,
    o.Name AS ProcessStep,
    o.Object_Type,
    o.Stereotype AS ShapeType,
    do.Sequence,
    STRING_AGG(COALESCE(CAST(c.End_Object_ID AS varchar),''), ',') AS NextProcessStep, --concat across rows and replace NULL with empty string
    s.Swimlane,
    o.Phase
  FROM [SPARX].[dbo].[t_diagram] AS d
  JOIN t_diagramobjects AS do ON d.Diagram_ID = do.Diagram_ID
  JOIN t_object AS o ON do.Object_ID = o.Object_ID
  JOIN t_object_CTE AS s ON o.ParentID = s.Object_ID -- join to temp table
  LEFT JOIN t_connector AS c ON o.Object_ID = c.Start_Object_ID 
  WHERE d.NAME LIKE '%EA Prepayment%'
  GROUP BY do.Object_ID, 
    o.Name,
    o.Object_Type,
    o.Stereotype,
    do.Sequence,
    s.Swimlane,
    o.Phase
  ORDER BY do.Sequence DESC

  SELECT StereoType,
         COUNT(StereoType) as 'Count'
  FROM t_object
  GROUP BY Stereotype
  ORDER BY 'Count' DESC

Visio Data Visualizer https://www.microsoft.com/en-us/microsoft-365/blog/2017/05/01/automatically-create-process-diagrams-in-visio-from-excel-data/

For a deeper understanding of Database Structure recommend buying Inside Enterprise Architect, Querying EA's Database by Thomas Kilian. Its an excellent resource for understanding the table structure.

https://leanpub.com/InsideEA