Book a Demo

Author Topic: Programatically enable and activate MDG Technology  (Read 2910 times)

Jim Lawrence

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Programatically enable and activate MDG Technology
« on: June 30, 2012, 07:19:33 am »
I've got a UML profile we've developed and want to load it, enable it and activate it programatically.  I've got it loaded (it shows up in "Settings>MDG Technologies"), but haven't been able to find a way to enable or activate it.  So ...

1) how is a MDG technology enabled programmatically?

2) how do I get the "ID" that IsTechnologyEnabled and IsTechnologyLoaded require (I tried the MDG Tech name but that didn't work)?

ActivateTechnology might work if it accepts the MDG Tech name or I can get the "ID".

Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Programatically enable and activate MDG Techno
« Reply #1 on: July 02, 2012, 09:16:37 am »
If you open your technology file in a text editor, the ID is the first attribute on line 2, e.g.

<MDG.Technology version="1.0">
  <Documentation [highlight]id="BPMN2.0"[/highlight] name="BPMN 2.0" alias="BPMN&#x2122; 2.0" ...
The Sparx Team
[email protected]

Jim Lawrence

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Programatically enable and activate MDG Techno
« Reply #2 on: July 03, 2012, 05:26:35 am »
Thanks for answering #2

As regards #1, I noticed the reference page for EA_OnInitializeTechnologies states:

"EA_OnInitializeTechnologies requests that an Add-In pass an MDG Technology to Enterprise Architect for loading.

This event occurs on Enterprise Architect startup. Return your technology XML to this function and Enterprise Architect loads [highlight]and enables[/highlight] it."

However, when I return the xml in the event handler, my technology is NOT enabled (i.e. when I check the "Setting > MDG Technologies .." window, the Enabled box is NOT checked).

Is the documentation in error or the EA code? or could my tech xml be causing an error (although, no errors are reported once loading is completed)?  My profile seems to be working fine once I manually enable and activate it.  I looked for a bug report on this but didn't see one.

What events occur after "EA_OnInitializeTechnologies" that I can use to activate my profile during EA startup?  I'm still looking to "activate" my tech without the user having to do it manually.

Thanks