Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: tzafrir on January 16, 2017, 04:46:57 am
-
Hi,
I am inserting new elements underneath a package.
Each time the new element is entered in the first position.
Then I can move them in EA up or down to change their order.
1. Does anybody knows where EA holds the sequence number (in DB?) of the position for each moved element?
2. Is there a specific API that I can use to change the sequence from AddIn?
Thanks,
Tzafrir
-
Basically it's Element.TreePos. But EA has a couple of Sparxish rules how things appear in the project browser.
q.
-
Thanks,
I am seeing that EA is sorting the elements by name when inserting to the tree.
Entering TreePos does not seems to give the order in the tree.
Isnt there a way, for example, to put an element, no matter what his name is as the last element in the browser tree.
-
As said: it's fancy. There's also an option "Sort features alphabetically" which plays a role.
q.
-
But how does TreePos affects the order?
If assigned it does not seems to do anything...
-
Solved the issue.
Thanks
-
Hello,
TreePos is a little weird. It holds the position in the tree as displayed in the project browser, but only if that order has been changed. If contents have been added to the package without ever having been resorted, TreePos is 0 for all elements because EA sorts them in its default order and doesn't look at TreePos.
HTH,
/Uffe