UML & SysML modelling languages

Expertise and blog articles on UML, SysML, and Enterprise Architect modelling tool

version francaiseTwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn
Wednesday, 16 March 2016 00:00

Sort elements in a package tree with eaUtils addin

Written by

eautils package tree sorting addin sparx ea

eaUtils sorting features update the elements tree position from a package or element. Sparx Systems Enterprise Architect applies a default sorting order based on the name of the elements. However to achieve a better management and more efficient use of the elements from within the Enterprise Architect project browser, it can be useful to have alternative and enhanced sorting options e.g. based on the alias, stereotype, tagged value, or according to the layout in a diagram.

This article illustrates a new feature introduced in eaUtils 1.11: sort elements within a package tree, using one of the available options (alias, stereotype, name, tagged value). Further information on all eaUtils sorting features are available from eaUtils Help.

Below is an extract from the project browser with the example used in this article, illustrating Sparx EA default sorting order, by name. The aim is to sort elements within each package by stereotype.

eautils addin sparx ea elements sorting package tree

Having eaUtils package tree setting enabled, this feature can be used via a right click on the main package "Primary Use Cases" > Extensions > eaUtils > Project Browser : Sort elements by stereotype. eaUtils addin opens the following dialog window, prompting to select the packages to process within the current tree:

eautils package tree window sparx enterprise architect addin

Below is a summary of the available actions or information:

  • Status: set to Ready unless the elements sorting is running (Busy).
  • eaUtils settings: a summary of the sorting settings values is displayed. A button is available to open eaUtils Settings.
  • Select all/none: enable or disable all packages within the displayed tree.
  • Tree: packages within the tree are displayed and can be individually enabled or disabled. Any locked package is greyed out and followed by (Locked).
    Note: Root nodes are always disabled and marked as locked as they cannot have any element to sort.
  • Sort elements in the selected packages by stereotype.: run the elements sorting within each selected package.
  • Cancel: close this window.

Whilst eaUtils sorting by feature is running, progress is updated as packages are processed.

eautils package tree window sparx enterprise architect addin running

 Once completed, all selected packages are marked as DONE, and a confirmation dialog is displayed.

eautils package tree window sparx enterprise architect addin result

Below is the new sorting order as checked in the project browser, where elements have been sorted by stereotype.

eautils addin sparx ea elements sorting package tree

Note: eaUtils Package Tree feature does not update elements within composite elements, e.g. activities under a use case. This requires running eaUtils Sorting feature onto each composite element.

eaUtils addin for Sparx Systems Enterprise architect is available to download from