Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ArshiaZare on June 13, 2023, 06:33:55 pm

Title: Python script to copy a repository (.eapx file) fully
Post by: ArshiaZare on June 13, 2023, 06:33:55 pm
Hey guys,
can anyone help me with how I can make a copy of the entire repository/eapx file to clipboard?

thank you
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: Geert Bellekens on June 13, 2023, 06:55:41 pm
Can you explain what you want to achieve?

Why would you want to copy the .eapx file tot he clipboard?
There might be better solutions that avoid using the clipboard alltogether.

Geert
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: ArshiaZare on June 13, 2023, 07:12:05 pm
Can you explain what you want to achieve?

Why would you want to copy the .eapx file tot he clipboard?
There might be better solutions that avoid using the clipboard alltogether.

Geert

so basicaly, our model is stored on a server and due to organizational reasons its taking and will take so long for us to have access to the server as a mod, we want to have safe copies of the file in order to have a very premitive version control for now so we can continue our work, however from what i have seen with EA's version control scripts, they all operate within the repository, so I wanted to know if there is a way to copy/paste the entire file.

if there are better ways please let me know since I'm very new to this im winging it 90% of the times :')
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: Geert Bellekens on June 13, 2023, 07:44:53 pm
If all you want is to make a copy of the file to another location, you don't need to use the clipboard.

See https://stackoverflow.com/questions/123198/how-to-copy-files (https://stackoverflow.com/questions/123198/how-to-copy-files)

Geert
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: qwerty on June 13, 2023, 08:08:21 pm
Well, if you make copies, then how will you merge the local changes made in the distributed files?

q.
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: ArshiaZare on June 13, 2023, 08:11:01 pm
Well, if you make copies, then how will you merge the local changes made in the distributed files?

q.

to be fair, this si not at all a long term solution, but rather a temp snapshot solution to make sure we dont lose our model.
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: ea0522 on June 13, 2023, 08:13:31 pm
If it is indeed a manual action, why not use the option to transfer a model?
See: https://sparxsystems.com/enterprise_architect_user_guide/16.1/model_exchange/performadatatransfer.html (https://sparxsystems.com/enterprise_architect_user_guide/16.1/model_exchange/performadatatransfer.html)
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: ArshiaZare on June 13, 2023, 08:48:17 pm
If all you want is to make a copy of the file to another location, you don't need to use the clipboard.


Geert
thank you for your response, Is there a way to export a package as xml using scripting?
Title: Re: Python script to copy a repository (.eapx file) fully
Post by: Geert Bellekens on June 13, 2023, 09:20:54 pm
Yes, Project Interface.ExportPackageXMI()

Geert