Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Dieter Goetz on June 25, 2016, 01:45:50 am
-
How can I disable a MDG technology from an Add-In?
Dieter
-
You can't - lol. I always wonder who's responsible for EA's API.
q.
-
I'm not sure why you'd allow it. It's a pretty standard practice not to allow one piece of software from interfering with another piece of software.
-
Because the software between your ears is allowed to control your fingers to do that.
q.
-
Thanks for your help - so I can stop searching for any tricky workaround.
-
There is no way to change the values directly through the API but EA stores so much settings in the registry, also the status of every MDG-Technology in the Key:
HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS\MDG_TECHNOLOGY_STATUS
I haven't tested the behavior of this, but I have done it for some other settings. Sometimes EA reads the registry keys on startup (which would require a restart after change) and sometimes it reads them before a specific action.
Maybe you can work with that :)
-
No, that won't work. EA does not recognize registry changes unless you restart it.
q.
-
Actually we wanted to check for newer version of an MDG technology on start-up.
There is a method EA_OnInitializeTechnologies() which is called on start-up. This method is called before EA loads any MDG technologies.
Even if there are any methods to delete an MDG, it will not work here.
The Add-In could look in the Appdata diretcory to check the installed version, update the XMI-file and forces the User to restart EA.
But what will happen if the same MDG is imported into the project? Which MDG becomes active? The API methods will not tell you.
It seems there is no smart way to check for an MDG Update on start-up.
Dieter
-
I don't think that's a good idea to automatically update a MDG. Any MDG changes usually mean a lot of work since you eventually change the semantics of elements. So a MDG change/update is kind of a new model release. This should not be done automatically.
q.
-
Because the software between your ears is allowed to control your fingers to do that.
The user is allowed to make that choice, which is different from the author of an add-in making the choice.
-
The easy way to update a technology dynamically is to deploy it to a shared path or url.
When EA starts it will ready the technology in whatever state it is in from the specified location.
-
The easy way to update a technology dynamically is to deploy it to a shared path or url.
When EA starts it will ready the technology in whatever state it is in from the specified location.
It sure is...
We do it that way and we are continuously improving the MDG - almost transparently to the user. We implement new features via a mechanism that typically allows the super users to try out and then they are released to the more general user. By the time the general user gets to see them, they are well bedded in and stable.
We've been doing this for over a year and the only issues raised have been by the super users in trial mode - and even then turned around in minutes.
YMMVWFU
Paolo
-
The easy way to update a technology dynamically is to deploy it to a shared path or url.
When EA starts it will ready the technology in whatever state it is in from the specified location.
It also allows you to predefine all of your models in the MTS and then drop them into the shared location as you get them finished :-)
-
Hi Paolo,
thanks for your feedback. We will use it in the same way. Local installations are higher prior than the deployed version from the server.
Dieter