Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Stefan Thielebein on November 06, 2009, 07:47:21 pm

Title: Automated project transfer from DBMS to EAP file.
Post 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
Title: Re: Automated project transfer from DBMS to EAP fi
Post by: Geert Bellekens on November 06, 2009, 08:06:01 pm
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
Title: Re: Automated project transfer from DBMS to EAP file.
Post by: adepreter on April 01, 2016, 11:35:32 pm
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
Title: Re: Automated project transfer from DBMS to EAP file.
Post by: qwerty on April 02, 2016, 12:01:23 am
This methods has been introduced with a very recent EA release. Let us know whether it works for you.

q.
Title: Re: Automated project transfer from DBMS to EAP file.
Post by: Geert Bellekens on April 02, 2016, 02:30:19 am
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
Title: Re: Automated project transfer from DBMS to EAP file.
Post by: smendonc on April 02, 2016, 04:00:47 am
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.


Code: [Select]
# 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()
Title: Re: Automated project transfer from DBMS to EAP file.
Post by: qwerty on April 02, 2016, 04:24:40 am
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.