1
Automation Interface, Add-Ins and Tools / Re: AddNew method does not work anymore in EA 6.5.
« on: March 16, 2007, 12:48:32 pm »
Yes. In my addin it also causes an exception.
Here is code (C#):
EA.Diagram activity = (EA.Diagram)eauc.Diagrams.AddNew(eauc.Name,"Activity");
activity.ShowDetails = 0;
activity.Update();
eauc.Diagrams.Refresh();
EA.Element initial = (EA.Element)eauc.Elements.AddNew("", "StateNode");
Last line causes an exception. Type of eauc object is UseCase. This code creates a diagram nested in UseCase element, but it cannot create a StateNode element.
I've already sent this piece of code with bug report to Sparx. They've promised to make its priority higher. Probably it can be resolved in one or two builds.
Best regards,
Konrad Madej
Here is code (C#):
EA.Diagram activity = (EA.Diagram)eauc.Diagrams.AddNew(eauc.Name,"Activity");
activity.ShowDetails = 0;
activity.Update();
eauc.Diagrams.Refresh();
EA.Element initial = (EA.Element)eauc.Elements.AddNew("", "StateNode");
Last line causes an exception. Type of eauc object is UseCase. This code creates a diagram nested in UseCase element, but it cannot create a StateNode element.
I've already sent this piece of code with bug report to Sparx. They've promised to make its priority higher. Probably it can be resolved in one or two builds.
Best regards,
Konrad Madej