Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: pH on September 24, 2010, 09:47:02 pm
-
Hi,
Can we sort a collection of element properties with in addin code?
I see many scenarios where sorting is required like sorting some elements in specific order or ordering attributes or operations,pre-conditions/ post-conditions or basic/alternate path, or the packages itself.
Thanks,
pH
-
pH,
You can, but not by trying to sort the actual EA.Collection. (if you have suicidal tendencies, then by all means go ahead and try to sort the EA.Collection :-X)
Each of those elements has its own sorting property. Attributes and Operations can be sorted using their Pos attribute.
For Elements within a package use TreePos, ...
Geert