Deploy An MDG Technology

Return to Introduction  Previous page  Next page

An MDG Technology can be deployed in one of two ways: as a file or from an Add-In.

Deploy From a File

To deploy your technology as a file, you have a number of choices:

·Copy it to a folder named MDGTechnologies, which you must create under your Enterprise Architect installation directory (by default this is C:\Program Files\Sparx Systems\EA. When you restart Enterprise Architect, your MDG Technology is deployed.
·Copy it to any folder in your file system, including network drives: use the EA Settings | MDG Technologies...menu option, press the Advanced button and add the folder to the Technologies path. This deployment method enables you to quickly and easily deploy a technology to all Enterprise Architect users on a LAN.
·Upload it to an internet or intranet location: use the Enterprise Architect Settings | MDG Technologies...menu option, press the Advanced button and add the URL to the Technologies path. This deployment method enables you to quickly and easily deploy a technology to an even wider group of Enterprise Architect users.

Deploy From an Add-in

To deploy your technology from an Add-In, you must write an EA_OnInitializeTechnologies function. The following example is written in C#:

public String EA_OnInitializeTechnologies(EA.Repository r)

{

       string technology = "";

       Assembly assem = this.GetType().Assembly;

       using (Stream stream = assem.GetManifestResourceStream("MyTechnology.xml"))

       {

               try

               {

                       using( StreamReader reader = new StreamReader(stream) )

                       {

                               technology = reader.ReadToEnd();

                       }

               }

               catch(Exception e)

               {

                       System.Windows.Forms.MessageBox.Show("Error Initializing Technology");

               }

       }

       return technology;

}