Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Stefan Thielebein on November 06, 2009, 07:47:21 pm
-
I want to automate the process to transfer a project from a database repository (in my case Oracle) and an EAP file.
This project transfer could be done manually with the tool option:
Tools/Data Management/Project Transfer
Has anyone an idea how to realise this as an automatic job each night to get a backup from the project to version it?
Please help.
Best regards
Stefan
-
Stefan,
I don't think the "Project Transfer" command is available from within the API, but why don't you explain exactly what you are trying to achieve (requirements wise), there might be a better solution then to use project transfer.
Geert
-
Was looking for same thing.
Found "ProjectTransfer" method in "Project" class
"http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/automation_and_scripting/project_2.html
-
This methods has been introduced with a very recent EA release. Let us know whether it works for you.
q.
-
This methods has been introduced with a very recent EA release. Let us know whether it works for you.
q.
Indeed, back in 2009 it was not available yet, now it is.
Geert
-
This has been asked somewhere else as well. The Powershell snippet below can be run from a scheduler to automate the process. All the caveats about having a user logged into an interactive session still apply.
# Create the EA object
$ea = New-Object -ComObject "EA.Repository" -Strict
# Get the project interface
$project = $ea.GetProjectInterface()
# Do the repository replication
$project.ProjectTransfer("<SourceFilePath>", "<TargetFilePath>", "<TransferLog>")
# Close the session and exit
$ea.Exit()
-
This methods has been introduced with a very recent EA release. Let us know whether it works for you.
q.
Indeed, back in 2009 it was not available yet, now it is.
Geert
Yeah! I just found that it was present in 9.3 (though this version was not Java-complete). You never stop learning.
q.