Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Guillaume on April 11, 2019, 11:43:00 pm
-
When I use an MTS file to generate the MDG Technology, it is convenient as it stores the previous selection (profiles, searches...)
It would be nice to have an option to automatically regenerate the UML Profiles (XML files) provided EA stores the source package in the XML.
It would save so much time not having to export each profile to the separate XML file.
I'm not sure this is feasible using the API as a workaround.
-
10+
API can currently not be used as a work around. I inserted a similar post some time ago.
-
10+
API can currently not be used as a work around. I inserted a similar post some time ago.
It can't? I thought I saw some new functions that allowed generated the MDG yourself. Is there still something missing?
I was planning to one day write a script to automation the complete MDG creation;
Geert
-
This plan I had as well.
For V14 I am not 100% sure, but I let a student of mine check it, and he stated that the API still misses the features needed.
-
You should be able to use the SavePackageAsUMLProfile and GenerateMDGTechnology methods on the Repository class to help automate building of your Technologies.
https://sparxsystems.com/enterprise_architect_user_guide/14.0/automation/repository3.html
As a basic example without any error checking...
//This script requires EA 14 or higher
var TECHNOLOGY_DIR = "C:\\Projects\\EA\\Technologies\\MyTechnology\\";
Repository.SavePackageAsUMLProfile("{725910FA-1F0C-47c9-9A36-0F138D3BE653}", TECHNOLOGY_DIR + "MyStereotypes.xml");
Repository.SavePackageAsUMLProfile("{00C6AF6F-2B28-4afb-9491-B8458FE94C8C}", TECHNOLOGY_DIR + "MyDiagrams.xml");
Repository.SavePackageAsUMLProfile("{9E5DB294-8505-4f33-8639-2728A21B4FE4}", TECHNOLOGY_DIR + "MyToolbox.xml");
Repository.GenerateMDGTechnology(TECHNOLOGY_DIR + "MyTechnology.mts");