visio - 将 Enterprise Architect 序列图转换为 Visio

标签 visio enterprise-architect sequence-diagram

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

最佳答案

如果您的 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/

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

https://leanpub.com/InsideEA

关于visio - 将 Enterprise Architect 序列图转换为 Visio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35763930/

相关文章:

git - 是否可以在企业架构师中使用 git 进行版本控制

vba - Visio 使用 VBA 以编程方式设置页面方向

powerpoint - Visio/PowerPoint 有什么好的替代品吗?

Python Visio 转 pdf

schema - 如何在 SPARX Enterprise Architect 中在包级别设置数据库模式?

c++ - C/C++ 函数指针的 UML 表示

UML时序图,调用

c++ - 时序图 : Thread processing over messages in queue

java - 多线程基于时间的调用层次结构

Visio 2010 : Adding a custom Stencil (permanently) to the Shapes menu