Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: Guillaume on February 05, 2020, 10:47:38 pm

Title: Native XML Project Transfer API support
Post by: Guillaume on February 05, 2020, 10:47:38 pm
It would be nice to add to the API Project Class a method to run the new Native XML Project transfer (export, import).
Title: Re: Native XML Project Transfer API support
Post by: VK on February 06, 2020, 08:38:25 am
The method ExportProjectXML() in the Project class allows exporting an entire Project to Native XML.
But, currently, no such method exists for importing Project Native XML files.

Help Topic Page : https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/automation/project_2.html
Title: Re: Native XML Project Transfer API support
Post by: Guillaume on February 06, 2020, 06:09:09 pm
Interesting to know. I'll have to test it (I take it works with a Cloud connexion).
Hopefully an import method will be available soon.

Title: Re: Native XML Project Transfer API support
Post by: Guillaume on March 08, 2021, 06:56:28 pm
Hello,

Is there any plan to release the API method to run the Native XML import on a project?

Thanks
Guillaume
Title: Re: Native XML Project Transfer API support
Post by: Eve on March 10, 2021, 08:44:43 am
No. For the same reason the API doesn't allow you to transfer to an existing repository.
Title: Re: Native XML Project Transfer API support
Post by: Guillaume on March 10, 2021, 05:30:29 pm
Hi Eve,

I was not aware of the limitation for the Project.ProjectTransfer method. Is there a technical reason that prevents this method from being used with a target DBMS?
Title: Re: Native XML Project Transfer API support
Post by: Eve on March 11, 2021, 08:51:05 am
No, it's a choice that we made that we didn't want a project being overridden completely through bad code.
Title: Re: Native XML Project Transfer API support
Post by: qwerty on March 11, 2021, 09:07:41 am
Isn't that already possible?
Code: [Select]
repository.execute("delete from t_object")can be done by anyone.

q.
Title: Re: Native XML Project Transfer API support
Post by: Eve on March 11, 2021, 09:37:03 am
No, that's malicious code and still less damaging than what could be accomplished by reversing two arguments of ProjectTransfer (if it was allowed)
Title: Re: Native XML Project Transfer API support
Post by: Guillaume on March 17, 2021, 07:40:42 pm
About the XML Native Transfer, would it be possible at least to provide the equivalent of the ProjectTransfer API support i.e. an API method to run the import onto a local file?

I'm working on a process that generates a public version of a EA project. The XML Native offers a great advantage e.g. to simply remove the EA security and locks by deleting 2 XML file before running the import.
Title: Re: Native XML Project Transfer API support
Post by: Guillaume on July 16, 2021, 03:48:10 pm
A quick update on this thread: I wrote an article on Sparx Community site about a custom command line tool to achieve what I was looking for.

https://community.sparxsystems.com/community-resources/1403-import-native-xml-enterprise-architect-postgresql (https://community.sparxsystems.com/community-resources/1403-import-native-xml-enterprise-architect-postgresql)