Repository.Open( ) is the command for opening a repository in the Automation Interface . The parameter for this can have a file path or an ODBC string as the parameter. An example of this is attached below.
This can be further automated by calling your application from within EA and passing across a parameter in the call. See:
http://www.sparxsystems.com.au/AutIntVBCallingFromEA.htm There is an example code using this type of call in:
http://www.sparxsystems.com.au/AutIntVBDownload.htmI hope this of help.
Sub Main()
Dim rep As EA.Repository
Dim Package As EA.Package
Dim aPackageGuid As String
Dim aProject As EA.Project
Set rep = New EA.Repository
‘ ODBC path ..
rep.OpenFile "SQLREPOS ---
DBType=1;Connect=Provider=MSDASQL.1; _
Password=xxxxx;Persist Security _
Info=True;User ID=xx;Data Source=xxxxx"
‘ File path
'rep.OpenFile "C:\Program Files\Sparx" + _
"Systems\EA\EAExample.eap"
Set Package = rep.Models.GetByName("Support")
aPackageGuid = Package.PackageGUID
Set aProject = rep.GetProjectInterface()
aProject.RunHTMLReport aPackageGuid, "C:\temp", "BMP", "", "htm"
rep.Exit
Set rep = Nothing
End Sub
