Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: fginfrance on July 07, 2011, 03:15:27 am

Title: Old topic? package.Elements changed behaviour
Post by: fginfrance on July 07, 2011, 03:15:27 am
Hello,

I have a question especially for those long-time experts.
Was there an issue with the behaviour of package.Elements() method. Do I remember correctly that it changed behaviour somewhere between v. 7.x and 9.0 from returning all Elemnts of a package to only returning top-level Elements - for which you have to call element.Elements method to have the child-elements?

I have the impression to remember a post like that, but I am unable to find it in the forum (if it really exists) and we have to anticipate the effort on porting a large toolbox from EA 7.5 to 9.0 soon.
So if anybody could help or might have some tips of how to efficiently search the forum.

Thank you in advance!

Frank
Title: Re: Old topic? package.Elements changed behaviour
Post by: qwerty on July 07, 2011, 04:12:33 am
IIRC this has been changed from 7.5 to 8.0. In 7.5 ALL elements were returned (which is of course incorrect) and from 8.0 only the direct children are returned (which is what one would expect). Unfortunately one can't deal with EA's interface easily You have to query the build and react accordingly. That is why I have a wrapper around the native EA methods. The Elements method still delivers the recursively retrieved elements for me.

q.

P.S. The post you searched was probably mine. But I can't find it as well.
Title: Re: Old topic? package.Elements changed behaviour
Post by: Geert Bellekens on July 07, 2011, 07:20:45 pm
I just searched all my old posts using the top left search button.
searchstring: package.elements
forums: Automation Interface... and Bugs/Issues
period: all

That returned (after a while) all posts about that specific issue.

Geert
Title: Re: Old topic? package.Elements changed behaviour
Post by: fginfrance on July 08, 2011, 08:02:28 am
Thank you guys!

Especially also for the hint on the "magic" search button on the LEFT, so well hidden and so much more useful than the field on the RIGHT  ;)

Regards
Frank