Book a Demo

Author Topic: Deploy An MDG Technology  (Read 2932 times)

Kezia

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Deploy An MDG Technology
« on: August 13, 2008, 06:44:16 pm »
Hi folks,

I want to deploy MDG from an Add In. I read that "EA_OnInitializeTechnologies" function is used for deploy MDG from Add-in, but after reading EA Help n trial n error on my add-ins, I still can't load my MDG into EA. I'm not sure where to put this function in order EA  execute it on start up since there is not enough information for me on EA help.

Please help me by giving a sample...
Thanks.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Deploy An MDG Technology
« Reply #1 on: August 14, 2008, 09:21:01 am »
Quote
I'm not sure where to put this function in order EA  execute it on start up

It would help to know what language you are using. In C# you put your broadcast handlers as shown:
Code: [Select]
namespace MyAddin
{
      public class Main
      {
            // insert your broadcast handlers here
      }
}
If this doesn't answer your question, please post your code (or send it to Sparx Support if you prefer) and that will make it easier to help you.
The Sparx Team
[email protected]

TheTwo

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Deploy An MDG Technology
« Reply #2 on: August 14, 2008, 09:38:38 pm »
Hi,

if you ar using C# maybe this helps you. I've done it in this way in MS VS. Add the MDG Technology file to your Project. For me it is in the folder "Resources"

Code: [Select]
namespace MyAddin
{
    public class Main
    {
        public String EA_OnInitializeTechnologies(EA.Repository Repository)
        {
            string technology = "";
            Assembly assem = this.GetType().Assembly;
            using(Stream stream = assem.GetManifestResourceStream("MyAddin.Resources.Technology.xml"))
            {
                try
                {
                     using(StreamReader reader = new StreamReader(stream))
                     {
                         technology = reader.ReadToEnd();
                     }
                }
                catch{}
             }
             return technology;
        }
    }
}