I did see that. So, I attepted to create an empty repository that I could load my XMI into using the following:
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
XmlDocument newDoc = new XmlDocument();
newDoc.Load(openFileDialog1.FileName);
EA.Repository rep = new EA.Repository();
EA.Project newProj = rep.GetProjectInterface();
newProj.ImportPackageXMI(newProj.GUIDtoXML(System.Guid.NewGuid().ToString()),newDoc.OuterXml,0,1);
}
But that did not seem to help.
The thing is, I am trying to give it a file, in XMI format from which I am hoping, it can populate the necessary connection, element and diagram fields.
I'm not sure what else it requires. I think may have to initialize the repository in a different manner, but I am stumped on how to do so.
Maybe I should create a blank EA document and load it from a C# resource file. So that the repository has something to connect to.
Edit: Hm. That won't work if the function requires a filename in order to load. I'll try with just a blank file.
Edit2: Ok. If I populate the repository with a blank .eap file, it seems that the code functions. Now, I probably need to figure out if there is a method to create a repository without using a file, so that I can store initialization code in a resource file. Also, I need to determine if the loaded XMI file populated by stub file correctly.
-jmad