Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ablaz on November 22, 2006, 09:21:21 am
-
EA version: 6.5.800
AddNew method of Automation Interface does not work anymore for nested elements (e.i. Port of the Component):
Example:
EA::Element* component;
.....
component->Elements->AddNew( "port1", "Port" ); // "Invalid parent for Port" exception
-
Have you reported this directly to Sparx?
The forum is good, but Sparx needs to know about this kind of thing directly.
From the EA main menu choose Help | On-line Resources | Bug Report Page. This will get you to the right spot.
Please let us know what happens, and whether Sparx has a workaround or an expected resolution date.
David
-
I reported this bug to Sparx Systems and they could reproduce it. It seems that the only workaround for now is downgrading to EA 6.5.799. ;D
Andrej.
-
This issue should be fixed in the next build of EA (6.5.801). If there are any problems after installing 801, please contact us again.
-
I'm experiencing a similar problem (intermittent failure when executing Elements.AddNew via C# - it ends up raising a COMException with the message "Internal error" - which causes EA to be shut down..
I can't reliably reproduce it alas - but it seems to be when I execute AddNew in a loop for multiple new elements that it eventually bails out...
-
bittercoder,
EA 6.5 build 801 should be available very soon. When it is released, please install and see if it resolves your issue. If the problem continues, please submit a bug report with details on the issue
http://www.sparxsystems.com.au/support/bug_report.html
-
Will do, thanks for the heads up.
-
Experiencing THE SAME PROBLEM with EA 6.5.801!
Guys, do you test your product releases at all? :)
-
Experiencing THE SAME PROBLEM with EA 6.5.801!
Guys, do you test your product releases at all? :)
To be fair to Sparx, they haven't claimed it would be completely fixed in build 801 nor was there mention of AddNew in the 801 release notes...
Paolo (not an apologist for Sparx...)
-
I thought that this issue is covered by the following statement in the release notes:
"Improved automation interface to allow creation of certain child elements via the automation interface."
Just to clarify the severity of this bug: for those who is extensively using the automation interface of EA for model creation, the new releases with unresolved issue 06110279 are ABSOLUTELY UNUSABLE.
-
Is this fixed?
I'm trying to transform an use case to composite element by creating a children activity diagram, whit its children elements using:
Set myDiagrama = myElement.Diagrams.AddNew("Use Case", "Activity") and
Set acti = myElement.Elements.AddNew(Name, "Activity")
but i get an error, and it doesn't let me create the nested activity diagram at all.
The same Add-in works fine in EA 799,
Example:
- Use case (view)
- Use case (package)
- use case diagram (diagram)
- UseCaseN1 (element)
- Activity Diagram (diagram)not working.
- ActivityN1 (element)not working.
i'm using EA 6.5.804
-
I'm afraid it is not. I've been trying to convince Sparx that this bug is not yet fixed since 6.5.801. But their tests pass. :-/
-
I'm correcting myself, i can create the diagram using:
Set myDiagrama = myElement.Diagrams.AddNew("Use Case", "Activity")
But i cant create the element using:
Set acti = myElement.Elements.AddNew("SomeState", "StateNode")
Anyone else is having this problem in EA 6.5.804?
Best regards...
-
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
-
Possible solution of the problem: do not set Repository.EnableUIUpdates property to "false" before creating the model in case you do it. That caused the exception in my case.
-
Hey Folks,
I've got the same problem under Build 804:
EA.Element requPartition = (EA.Element) el.Elements.AddNew("Requestor", "ActivityPartition");
throws an exception!!!!.....BUT my Add-In worked fine under Build 79x!!!
The exception is: Invalid Parent for ActivityPartition (Class)
Why shouldn't it be allowed to add a new ActivityPartition under a Class?!?!?!
Has anyone a solution????
Thanks
-
I also noticed that disabling UI updates (Repository.EnableUIUpdates = false) appears to cause problems when adding child elements... thanks for confirming this ablaz.
Which leads me to wonder what use that property is at all... disabling UI updates while adding 30 child elements seems like best practice to me.
-
Hi all,
I am using the automation interface with Python and so far I can recreate all the structure I need, but I have problems adding child elements (specificically: a 'Class') into Artifacts. I always get the error:
...add_Class Failed: (-2147352567, 'Exception occurred.', (10, 'EA', 'Invalid parent for Class (Artifact)', None, 0, 0), None)
however, adding a 'Class' child element into a 'Class' element works fine.
adding an 'Artifact' into an 'Artifact' works also fine.
what can I do? I work in EA 6.5.806 but I tested it also in EA 7.0.810 (Beta) with same results.
thanks for any useful help in advance,
Best Regards,
Pablo
PS: maybe this is somehow related to the topic: "AddNew method does not work anymore in EA 6.5.800" but the solution there didnt help me at all.
-
There was a fix in build 814 that corrected this behaviour. The automation interface should now allow all the same nesting rules as the project browser.