Author Topic: Disable MDG technology from Add-In  (Read 10078 times)

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Disable MDG technology from Add-In
« on: June 25, 2016, 01:45:50 am »
How can I disable a MDG technology from an Add-In?

Dieter

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #1 on: June 25, 2016, 03:09:17 am »
You can't - lol. I always wonder who's responsible for EA's API.

q.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #2 on: June 27, 2016, 07:30:19 am »
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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #3 on: June 27, 2016, 02:56:54 pm »
Because the software between your ears is allowed to control your fingers to do that.

q.

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #4 on: June 27, 2016, 09:26:32 pm »
Thanks for your help - so I can stop searching for any tricky workaround.

Julian O

  • EA Novice
  • *
  • Posts: 10
  • Karma: +1/-0
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #5 on: June 27, 2016, 09:41:17 pm »
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:
Code: [Select]
HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS\MDG_TECHNOLOGY_STATUSI 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 :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #6 on: June 28, 2016, 01:44:56 am »
No, that won't work. EA does not recognize registry changes unless you restart it.

q.

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #7 on: June 28, 2016, 02:21:37 am »
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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #8 on: June 28, 2016, 03:09:07 am »
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.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #9 on: June 28, 2016, 07:33:02 am »
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.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #10 on: June 28, 2016, 09:32:15 am »
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.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #11 on: June 28, 2016, 09:52:05 am »
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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #12 on: June 28, 2016, 10:23:03 am »
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 :-)

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Disable MDG technology from Add-In
« Reply #13 on: June 29, 2016, 12:01:27 am »
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