我们正在为我们的模型使用Enterprise Architect,它使用数据库来保存其所有数据。我们现在需要对数据进行每日“转储”,以便可以将其存储在配置管理系统中。有什么简单的方法可以做到这一点吗?
发布于 2011-12-09 15:31:40
对此没有特定的内置函数。EA有几个版本控制选项,但它们是基于包的,而不是整个项目。
(顺便说一句,不建议将外部版本控制系统与存储在数据库中的EA项目结合使用,因此,除非您完全确定自己在做什么,否则不要走这条路;请使用EA的基线。)
使用“项目转移”功能(在“工具”-“数据管理”下)可以很容易地手动转储项目。这允许您将整个项目从数据库传输到.EAP文件(以及其他三个组合)。该过程通常只需不到一分钟。
此函数在EA API (Project::ProjectTransfer)中也可用,因此如果您希望自动化它,可以这样做。在以前的工作中,我设计并实现了一个版本控制解决方案,其中这是一个组件,所以它可以完成,甚至不是那么难。
发布于 2017-02-17 09:40:09
这可能很旧,但是为了记录来自Geert Bellekens的VBScript的一些示例代码
sub main
Dim CurrentDate
Currentdate = Replace(Date, "/", "-")
dim repository
dim projectInterface
set repository = CreateObject("EA.Repository")
Dim FileName
Filename = "EA_Export.eap"
dim LogFilePath
LogFilePath = "C:\EA\EA_to_EAP.log"
dim TargetFilePath
TargetFilePath = "C:\EA\EA_Export.eap"
dim eapString
eapString = "EAConnectString:DB_EA_PROD --- DBType=1;Connect=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DB_EA_PROD;Data Source=BESQLCP;LazyLoad=1;"
'get project interface
set projectInterface = repository.GetProjectInterface()
projectInterface.ProjectTransfer eapString, TargetFilePath, LogFilePath
'repository.CloseFile
repository.Exit
Dim newFilename
newFilename = "C:\EA\EAP_Files\EA_Export_" & CurrentDate & ".eap"
Dim Fso
Set Fso = WScript.CreateObject("Scripting.FileSystemObject")
Fso.MoveFile "C:\EA\EA_Export.eap", newFileName
end sub
main引用自:http://sparxsystems.com/forums/smf/index.php/topic,37635.msg235329.html#msg235329
https://stackoverflow.com/questions/8433323
复制相似问题