Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: tanja on February 09, 2010, 11:40:48 pm
-
I create a state under a class, and Java API (EA 7.1) GetElement method on both class and its containing package return the above state as a child. The same seems to apply to statechart diagram (also defined under a class). I'm surprised to see this implicit containment by package, whereas I expect the class to be the only container.
Any thoughts on this?
-
The version 8.0 version of the API changes this behavior. If you can't or don't want to upgrade you can add a check that parentid is zero.
-
Thanx, I confim it worked:
On package.GetElements(), I keep elements (for State) and on package.GetDiagrams(), I keep diagrams (for Statechart) that have parentID=0. This way I skip the others, hopefully I don't miss important stuff...
Anyway, I will certainly be upgrading to version 8 when it gets released as production stable.