I started last year a personal addin project for Sparx Enterprise Architect; eaUtils was intended to gather features that have addressed situations I came across over the past years. Initial eaUtils features come from scripts that were shared with the community (see Enterprise Architect project browser scripts: sort elements by alias or by tagged value).
Following an initial version launched in December 2015, enhancements were released in February 2016 with eaUtils 1.11. Current features include:
- Sort elements from a package tree, a package, or composite element by Alias, Tagged Value, Stereotype or Name
- Sort a package elements according to their layout order in a diagram (top to bottom or left to right)
- Generate elements alias values according to their order in a diagram
- Generate the breadcrumb trail in a diagram
Elements sorting
eaUtils sorting features update the elements tree position from a package or element. Enterprise Architect applies a default sorting order based on the name of the elements. In order to achieve a better management and more efficient use of the elements from within the 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.
eaUtils latest version provides a way to sort elements within a package tree, which is illustrated below. Further information on eaUtils sorting features is available from eaUtils Help.
Sort elements by alias in a package tree
Having enabled the package tree option, this feature can be used via a right click on the main package > Extensions > eaUtils > Project Browser : Sort elements by alias. eaUtils addin opens the following dialog window, prompting to select the packages to process within the current tree:
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...: 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.
Once completed, all selected packages are marked as DONE, and a confirmation dialog is displayed.
Generate aliases
eaUtils provides a feature that generates elements aliases according to their order in a diagram, from top to bottom or left to right. I often use this feature to generate use case aliases according to their order in a diagram e.g. UC_001, UC_002.... It also can be applied to other diagrams such as UML activity, BPMN process, Archimate, etc.
Consider the following use case diagram:
Note: use cases on the above diagram are stored in the same package whereas actors are located in a dedicated one. eaUtils provides an option to deal with this situation so that external elements (actors) are ignored when generating the alias.
eaUtils provides a range of settings to define the prefix, suffix and numbering format to generate in each alias. Below is an example for the current example:
- the prefix is set with the element's name followed by an underscore e.g. UseCase_
- the numbering will be generated with 2 leading zeros e.g. 001, 002...
- the suffix is set to "_BookStore"
- only Use Case elements are processed
Running eaUtils "Generate Alias" leads to the result below:
Breadcrumb trail for diagram navigation
Navigating between a large number of opened diagrams within a Sparx Enterprise Architect modelling project can be cumbersome. Having opened successive composite elements such as an activity, use case, or BPMN2 subprocess, going back to the previous diagram is often not easily achievable. This issue is not only valid when one uses Sparx tool, but also when a published HTML version is opened in a web browser (e.g. Firefox, Chrome, IE).
A workaround involves creating a diagram hyperlink back to each calling/linking diagram; eaUtils addin provides a Breadcrumb Trail feature that generates such hyperlinks within an active diagram. In the example below, a BPMN2 process is detailed via an associated composite BPMN diagram:
Running eaUtils breadcrumb feature on BusinessProcess1 diagram leads to the following result i.e. a hyperlink back to the Business diagram has been created:
eaUtils addin for Sparx Systems Enterprise Architect
eaUtils is listed as a Sparx Systems 3rd Party Add-In in the Model Management Category.
eaUtils addin can be downloaded for free from www.eautils.com website, where an online help content is also available.