This is the script (VBScript) I use.
The connectionstring is copied from an encrypted EA shortcut file.
This fully automatically transfers our projects from SQL Server to .eap files.
const logPath = "G:\Projects\80 Enterprise Architect\Output\Backups\LogFile\"
const backupPath = "G:\Projects\80 Enterprise Architect\Output\Backups\"
'---------------------------CONFIGURATION---------------------------------------
const EADEVconnectionString = "DBType=1;ConnectEx=6' lgOUNphsdL9V'v^;KJl*`XYta*2{S3%Qoj=E*7%u<# R7w(E9p%?Yajszqn#87d3Q$+NX3Gn<SdG!W|^)AJ[XQ!Z{mY""muLhLVnIW'Q6t,3Sq4'(fA6-GI|GK1DY8[iwAvtW2I3XZ:ydO`97W70[m2ieu=l@+*7{=HsGsqdw=^aFD)Wy-^3{;cfgVxov2az:7mC0T5^<IR""=:<<<!$Ke10\fzF^*:iJ-R,U?ct^i; V9_fpj5,maX64Xb\_]1TfQIX{n()$jv\2@`g'ndbnK8%FCWW)#vEEj`"
'---------------------------CONFIGURATION---------------------------------------
sub main
dim repository
set repository = CreateObject("EA.Repository")
'backup DEV
backupRepository repository, EADEVconnectionString, backupPath, logPath, "EA DEV"
'close EA
repository.Exit
'tell user we have finished
msgbox "Finished backups"
end sub
function backupRepository (repository, sourceModel, backupPath, logPath, modelName)
Dim currentDate
currentdate = (Year(Date) & (Right(String(2,"0") & Month(Date), 2)) & (Right(String(2,"0") & Day(Date), 2))) 'yyyymmdd'
dim projectInterface
dim logFilePath
logFilePath = logPath & CurrentDate & " " & modelName & " (back-up).log"
'delete logfile if exists
deleteFile logFilePath
dim targetFilePath
targetFilePath = backupPath & CurrentDate & " " & modelName & " (back-up).eap"
'delete targetfile if exists
deleteFile targetFilePath
'get project interface
set projectInterface = repository.GetProjectInterface()
'execute project transfer
projectInterface.ProjectTransfer sourceModel, targetFilePath, logFilePath
end function
function deleteFile (filePath)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(filePath) then
fso.DeleteFile filePath
end if
end function
main
I'll try to adapt this to check if it also works to transfer from .eap to .qea
Geert