简体   繁体   English

Sparx EA-导入关系或SQL查询以修改连接表

[英]Sparx EA - Importing relationships or SQL query to modify connection table

This is an add on from the following questions: Here 这是以下问题的补充: 在这里

I am about to upload a couple thousand requirements into EA Sparx however then to setup the relationships we would have to do so one by one and would take someone around a week to do. 我将要上传两千个需求到EA Sparx中,但是要建立关系,我们将必须一个接一个地做,并且要花一个星期左右的时间。 Therefor we would like to import the relationships if possible. 因此,如果可能,我们希望导入这些关系。

From the answers I have found online we can either use a script to import or use a script to alter the database. 从我在网上找到的答案中,我们可以使用脚本导入或使用脚本更改数据库。

I have created a VB script that will edit table data but not ADD TO a table. 我创建了一个VB脚本,该脚本将编辑表数据,但不会添加到表中。

Does anyone happen to know an import script? 有人碰巧知道导入脚本吗? we already have the relationships aligned on an Excel sheet. 我们已经在Excel工作表上对齐了关系。

Creating new connectors is best done in code using EA.Element.Connectors.AddNew() and not directly in the database because then the EA API will do the hard work and you can be sure of the result. 创建新的连接器最好使用EA.Element.Connectors.AddNew()在代码中完成,而不是直接在数据库中完成,因为这样EA API会很辛苦,并且您可以确定结果。

To get some inspiration have a look at my Simple VBA Excel to EA importer . 为了获得一些启发,请看一下我的从简单VBA Excel到EA导入程序 This excel file with vba macro's imports classes, attributes and the glossary. 此Excel文件包含vba宏的导入类,属性和词汇表。

Importing connectors is pretty similar to this. 导入连接器与此非常相似。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM