Enterprise Architect version 13.5

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook google plus twitter youtube linkedin

Monday, 29 August 2016 12:57

Generic element Auto counter

Motivation

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, ...).

Idea

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

 

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.

 

Petr Přibyl

CCA Group a.s.

This email address is being protected from spambots. You need JavaScript enabled to view it.

 

Published in Community Resources