Prev | Next |
Auto Names and Counters
When you create a new element in your model, you have different options for naming the element depending on how you are creating it. If you create the element:
- On a diagram, the system applies a default naming convention of the element type plus the increment of the number of elements of that type in the same Package - for example, Actor4; you can change this to any other name by editing the 'Name' field on the element's 'Properties' dialog
- Within the Browser window, the system prompts you to type the element name into the 'New Element' dialog
You can also set up your own, automatic, naming and numbering convention for elements of the same type, so that:
- On a diagram, it is your naming/numbering convention that is automatically applied to the new element (which you can still change if you need to, as before)
- Within the Browser window, the 'New Element' dialog applies the naming convention to your new element
This is an example of the Auto Name Counter window showing an example name and counter for new Requirements.
If you have existing elements in a Package, and you want to apply the new naming convention to them, you can make this change very easily to all elements of the same type in the Package at once.
You define a naming convention for the element type as a model setting. At the same time, you can also optionally define a naming/numbering convention for the 'Alias' field and/or for a stereotype for elements of that type.
Access
Ribbon |
Settings > Reference Data > Settings > Auto Names and Counters |
Set up Auto Naming for an Element Type
Option |
Action |
See also |
---|---|---|
Type |
Click on the drop-down arrow and select the element type to which to apply auto naming/auto numbering. |
|
Stereotype |
If you want to apply the naming convention to a particular stereotype of the element type, click on the button to the right of the field, and locate and select the stereotype name using the Stereotype Selector dialog. Note that you can apply one naming convention to the base element type (such as a Class) and a different naming convention to a stereotype of that element (such as a SysML Block). |
Stereotype Selector |
Name Prefix |
Type a prefix for the new names (optional). |
|
Name Counter |
Type the counter value; use as many 0's as required to pad the number. |
|
Name Suffix |
Type a suffix for the new names (optional). |
|
Name Apply on creation |
Select the checkbox to apply auto naming to each new element of the specified type, on creation. If you do not select the checkbox (but click on Save), the autonaming details for the specified element type remain defined in the dialog, but are not applied to new elements of that type. The default element naming convention takes effect (<element type><n>). |
|
Alias Prefix |
Type a prefix for the new Aliases (optional). |
|
Alias Counter |
Type the counter value; use as many 0's as required to pad the number. |
|
Alias Suffix |
Type a suffix for the new Aliases (optional). |
|
Alias Apply on creation |
Select the checkbox to apply Alias auto naming to each new element of the specified type, on creation. If you do not select the checkbox (but click on the ), the Alias autonaming details for the specified element type remain defined in the dialog, but are not applied to new elements of that type. The default element naming convention takes effect (<element type><n>). |
|
Save |
(The default highlighted button.) Click on this button to preserve the values you have entered, and leave the dialog open for further chabnges. New elements of this type now have an automatically-generated name and/or Alias with an incrementing counter value.
If an Alias is active, to view the Alias in a diagram requires that the option 'Use Alias if Available' is selected in the 'Properties' dialog for the diagram. |
Add Elements Directly To Packages Configure Diagram Display |
Save & Close |
Click on this button to preserve the values you have entered, and close the dialog. The button has the same effects on element names as the . |
|
Close |
Click on this button to close the dialog and cancel the values you have entered, leaving element auto-naming unchanged. |
Notes
- Automatic numbering - whether system default or user-defined - does not increment across Package levels; if you have an element called Actor1 in Package A, and you create an Actor element in a child Package of Package A, that Actor will also be Actor1