Book a Demo

Author Topic: Load multiple MDGs in OnInitializeTechnologies  (Read 5360 times)

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Load multiple MDGs in OnInitializeTechnologies
« on: August 15, 2014, 02:18:23 am »
Hi all,

I have multiple MDG technologies which should be separated due to their contents. However, I'd like to load all of them from within one add-in.

I usually merge all profiles together in one MDG programmatically with the result that all toolboxes appear under one entry, which should not be the case here.

Any thoughts?
« Last Edit: August 15, 2014, 02:19:09 am by McMannus »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #1 on: August 15, 2014, 02:33:39 am »
Well, just call Repository.ActivateTechnology for all the separate MDGs then.

q.

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #2 on: August 15, 2014, 02:36:23 am »
Thanks for your input, but actually I'd like to embed the MDGs into the add-in.
As fas as I know, Repository.ActivateTechnology requires to have the MDGs loaded into the application.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #3 on: August 15, 2014, 06:09:42 am »
Maybe it's just too late for me, but what do you mean by "embed MDG in add-in"?

q.
« Last Edit: August 15, 2014, 06:10:01 am by qwerty »

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #4 on: August 15, 2014, 06:11:20 am »
One can import the MDG xml file as a resource into the .NET project and return that string at runtime in the OnInitializeTechnologies event. The XML is then embedded into the add-in assembly.
« Last Edit: August 15, 2014, 06:12:06 am by McMannus »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #5 on: August 15, 2014, 06:23:12 am »
Oh, I see. I have never used that :-/

q.

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #6 on: August 15, 2014, 06:24:42 am »
Just FYI: This can be used advantageous to simplify deployment, because you know that the technology is always up-to-date.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #7 on: August 15, 2014, 07:34:07 am »
I guess there are good use cases for this. But up to now I was just happy using MDGs with the switches from the EA menu ;)

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Load multiple MDGs in OnInitializeTechnologies
« Reply #8 on: August 15, 2014, 09:18:31 am »
From memory you can only include a single technology with an add-in. You can however include multiple profiles within the one technology. If that's not suitable for you, maybe you could distribute multiple add-ins. The others won't need anything except the connect and OnInitializeTechnologies calls.