将Enterprise架构师序列图转换为Visio

时间:2016-03-03 05:28:04

标签: visio enterprise-architect sequence-diagram

我使用Sparx Enterprise Architect创建了15个序列图。我的客户只想在Visio中使用这些图表。是否有任何工具可以将已创建的EA图转换为Visio?

1 个答案:

答案 0 :(得分:0)

如果您的EA实例在MS SQL Server上,则可以从Sparx EA导出形状数据,然后使用数据可视化工具(Excel导入)导入到Visio

查询以提取:

--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数据可视化器 https://www.microsoft.com/en-us/microsoft-365/blog/2017/05/01/automatically-create-process-diagrams-in-visio-from-excel-data/

要更深入地了解数据库结构,建议购买Thomas Kilian的《 Inside Enterprise Architect,查询EA数据库》。它是了解表结构的绝佳资源。

https://leanpub.com/InsideEA