Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: OilyRag on September 20, 2007, 08:44:25 pm
-
I've been working with the automation interface, creating a package hierarchy programatically in a recursive descent like way, specifying exactly the order in which I want my packages to be seen in (as I imagine seeing them in the project browser).
However, they never appear in the desired order in the project browser once my automation addin completes. Why?
I guess the next question would be, if I ran a recursive descent parsing algo on the model in my automation code, would I encounter the packages in the order I created them? I havent tried that yet but will later today.
Has anyone else got some insight into what EA is doing here?
Does setting TreePos on a newly created object do anything?
How can I stop EA apparently sorting packages alphabetically or otherwise?
:-/
-
Alphabetical ordering is an option (somewhere in the options djungle)
-
Check out the following:
The Allow Free Sorting box on the main Tools | Options dialog. This affects how things are displayed in the Project Browser tree.
On the Tools | Options | Objects dialog look at the check boxes near the bottom of both columns. These have a lot to do with how features are sorted.
David
-
I already have "Allow Free Sorting" enabled, and I have already turned off the Tools-Objects-Sort Features Alphabetically option. It has made no difference.
I am using EA version 7.0.815 by the way.
-
Sparxsupport emailed me a solution
Calling RefreshModelView() seems to do the trick.
-
There was quite a discussion on related issues within the past few weeks. You might want to search on RefreshModelView to see if there was anything else you might want to know.