An Enterprise Architect project contains hundreds or thousands of elements. Name of these elements alone are often not enough to uniquely identify them. It is important to mark every element with its own unique code.
Enterprise Architect provides the Auto Naming and Auto Counters feature which efficiently generates code elements. The element number is determined by its type, each element type has its own sequence of numbers.
Unfortunately, the numbering according to the types of elements is not always sufficient. We often need sequences derived from first level components. For example, we have other sequence for 'Accounting' component use cases (UC-ACC001, UC-ACC002, ...) and other sequence for the "Billing" component use cases (UC-INV001, ...).
We implemented an extension for generating element codes based on existing element names.
The basic idea is to use the first specified code as a mask for the others. User has to name first element, for example:
UC-ACC001: Create an account
If user creates another use case, he does not need to know the final number. He uses a placeholder
UC-ACC*: Modify an Account
Finally, user runs extension "CCA Numbering", which replaces the placeholder with a new number.
Such a solution is much more general. You can have multiple sequences within a single element type. You can have a number sequences across different types of elements. This can be applied for example in Activity diagrams, if you want a uniform numbering for Activities and Actions together.
Solution code is attached. The program looks for the next element number directly in the project repository. The query syntax corresponds repository stored in the EAP file.
Any comments are welcome.
CCA Group a.s.