Hi,
i've a similar problem...
I have to write an add-in that handles a set of packages defined in a separate root model.
When I create the first new package all seems to be fine,
BUT as soon as I try to create another package I get an error message box in EA that says me that an Array out-of-bound problem occurred... ieven if i try to restart EA, the problem still occurs.
it seems that the Collection fails to tracks its size...
but if I try to get the collection size, I got "1" since from the first attempt.
Moreover, if I try to manually delete the package, my code works as with a fresh file (ie. i can create only the first package).
but why?

what i've forgot to do?
if may halps, this is a code fragment i use:
............................
if (myModel.myAssessmentsRoot.Packages.GetByName(this.textAssessmentName.Text) != null)
{
MessageBox.Show("The Assessment Name must be unique. please insert another name.", "Warning.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
EA.IDualPackage newpak = (EA.IDualPackage)(myModel.myAssessmentsRoot.Packages.AddNew(this.textAssessmentName.Text, AppConfig.EAP_PACKAGE_TYPE));
newpak.Update();
myModel.myAssessmentsRoot.Packages.Refresh();
myModel.myAssessmentsRoot.Update();
............................
Could Someone helpme, please?

Best regards,
/D