Book a Demo

Author Topic: Model Templates with MDG deployed from Add-in  (Read 5070 times)

Dominik Rost

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Model Templates with MDG deployed from Add-in
« on: January 29, 2016, 08:47:37 am »
Hi guys,

I searched the forum but I could not find an answer. I have an MDG i deploy from an Add-in according to the information described here: http://www.sparxsystems.com/enterprise_architect_user_guide/12/extending_uml_models/deploying_mdg_technologies.html

The MDG loads and is usable without any problem. However, I also have two model templates I specifiy with a relative location. When I try to use the templates in EA I get an error, saying that the specfiied object cannot be located.

I suspect the problem is that the location does not refer to the assembly directory but to some other location when the MDG XML file is loaded in that way.

So my question would be, what is the correct way to load model templates with MDGs deployed from an add-in?

Thanks for your help.

Best regards,
Dominik

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Templates with MDG deployed from Add-in
« Reply #1 on: January 29, 2016, 08:59:04 am »
I should know, but I don't. Although I seem to remember a recent thread with similar keywords. Have you tried searching? (I know that it's sub-optimal...)

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Model Templates with MDG deployed from Add-in
« Reply #2 on: January 29, 2016, 09:08:39 am »
I think they need to go into the directory within the EA install path.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Model Templates with MDG deployed from Add-in
« Reply #3 on: January 29, 2016, 10:06:45 am »
I've always placed all additional material in the same directory as the MDG XML file.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Model Templates with MDG deployed from Add-in
« Reply #4 on: January 29, 2016, 10:51:47 am »
If deploying with an add-in, another solution is to have your model templates as string resources of your add-in project, then return them in response to the EA_OnRetrieveModelTemplate broadcast event.
http://sparxsystems.com/enterprise_architect_user_guide/12.1/automation_and_scripting/ea_onretrievemodeltemplate.html

Dominik Rost

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Model Templates with MDG deployed from Add-in
« Reply #5 on: January 31, 2016, 06:39:41 am »
Using the EA_OnRetrieveModelTemplate event did the trick for me.

Placing the other XML files in the same folder as the MDG did not work in this case.

Thanks everyone for your help.

Dominik