Author Topic: Programmatic Export of XMI  (Read 2356 times)

salayande

  • EA User
  • **
  • Posts: 224
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Programmatic Export of XMI
« on: June 02, 2008, 07:26:12 pm »
Dear all,

I am writing an Add-In to programmatically export model contents as an XMI file. I plan to import this XMI into another development software.

This Add-In should access EA, enable the selection of model objects and export these objects as a single XMI file.

I would appreciate if someone has a piece of code that demonstrates how I may use the EA API features:

I want to be able to call the ExportPackageXMI from a button  and perform a number of functions as well:

private void button1_Click(object sender, EventArgs e)
        {
            EA.IDualPackage ParentPackage = m_Repositroy.GetPackageByGuid("m_Repositroy");
            string fileName = "PegaBridge";
            long useDTD = 1;
            long formatXML = 1;
            long diagramImage = -1;

            string s = ParentPackage.PackageGUID;
            XMIType xmitype = XMIType.xmiEA11;
            long diagramUML = 1;
            ExportPackageXMI(s,xmitype,diagramUML,fileName,useDTD,formatXML,diagramImage);
}


private void ExportPackageXMI(String pguid, XMIType xmitype, long diagramUML, string fileName, long useDTD, long formatXML, long diagramImage)
        {
            //Get UML, model element
            //Convert UML to XMI
            //Store XMI in input folder
        }
Thank you in anticipation.

Segun