Book a Demo

Author Topic: Returning an updated MDG from EA_OnInitializeTechnologies  (Read 4445 times)

jasoncare

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Returning an updated MDG from EA_OnInitializeTechnologies
« on: December 06, 2016, 04:37:55 am »
Hi All,

I'm currently working on an add-in for EA. In our EA_OnInitializeTechnologies we add our stereo types and tags to our XML doc through code before returning it. I've noticed that when we add tags they don't show up in my existing test project but if I create a new project they will appear. If the MDG is cached in the project is there a way to update it?

I've tried changing the version attribute of the Documentation element to see if that would refresh it.

Thanks,
Jason

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Returning an updated MDG from EA_OnInitializeTechnologies
« Reply #1 on: December 06, 2016, 08:21:58 am »
I think you'll need to remove the model technology from the MDG technologies list.

jasoncare

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Returning an updated MDG from EA_OnInitializeTechnologies
« Reply #2 on: December 07, 2016, 02:11:12 am »
Hi Simon,

Thanks for your reply.

We've actually tried doing this. While having remote debug on, I went to Extensions -> MDG technologies and unchecked my plugin. This ran the EA_OnInitializeTechnologies again (I found this odd, I thought it would only run when turned on). Then I checked it back on and it ran again. Stepping through the code I can see the new tags getting added to the XML but they do not appear in the existing project.

It looks like it runs when any other plugins are removed. I can see this being useful if you are dependent on any others but I didn't think it would run when I unchecked my own plugin. Is there a state value in the repository prameter that can notify me that I've been disabled?

I'm running this on EA version 12.0.1215


Jason

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Returning an updated MDG from EA_OnInitializeTechnologies
« Reply #3 on: December 07, 2016, 09:06:37 am »
What I meant wasn't disabling and re-enabling your plugin.

There may be another MDG technology (or an old version of the same one) imported into that model that uses the same ID as your technology or a profile it contains.

If that's the case, you'll need to see what technologies are available in that model and remove the one that matches your technology.

Of course, that's only a guess and the problem could be something completely different.