Prev Next

Add Elements Directly To Packages

You can quickly add new elements to a Package without necessarily adding the element to a diagram at the same time. This is particularly useful in defining a group of Requirements, Changes, Issues, base Classes or other element types that you might not need to represent on diagrams in the model. You do, however, still have the option of adding the element to an open diagram.

Access

Ribbon

Design > Element > Insert > Insert New Element into Model

Context Menu

Right-click on Package | Add Element

Keyboard Shortcuts

With a Package selected in the Project Browser: Ctrl+M

In a diagram, press the M key

Other

Project Browser caption bar menu | New Element

Add an element to a Package

Option

Action

See also

Name

Type the name of the element.

Auto

As an alternative to typing in the name, click on this button to insert predefined auto-counter text.

If you already have some text in the 'Name' field, it is over-written by the auto-counter text.

Set Auto Naming and Auto Counters

Type

Click on the drop-down arrow and select the required element type from the list.

The list of element types is derived from the diagram or technology shown in the 'Toolset' field.

Toolset

Shows the current UML diagram type, Profile, Add-In or MDG Technology within which you are creating the element.

Toolset (button)

If the Toolset is not appropriate for the type of element you want to create, click on this button and select the required diagram type or technology.

The <default> group in the list provides a basic set of elements drawn from across the UML Behavioral and Structural groups, and the Enterprise Architect Extended groups.

The selected technology is displayed in the 'Toolset' field.

Stereotype

If required, either type the stereotype name or click on the drop-down arrow and select the stereotype.

This field is not available if the element you are creating is an extended element that already has a stereotype.

Add to current diagram

This checkbox is available if you have a diagram open and you are working from the Project Browser.

The checkbox defaults to selected to add the new element to the diagram also; if you do not want the element in that diagram, deselect the checkbox.

If you accessed this dialog by pressing the M key on the open diagram, this checkbox is not available. The element is automatically added to the diagram, in the top left corner.

Save

Click on this button to create the element and close the dialog.

If you accessed this dialog by pressing the M key in an open diagram

  • the element is created in the top left corner of the diagram, and
  • the dialog remains open

If you accessed the dialog by selecting the 'New Element' option from the Project Browser header drop-down menu, clicking on this button also leaves the dialog open.

Save and Exit

Available if you have accessed this dialog by pressing the M key on an open diagram, or by selecting the 'New Element' option from the Project Browser header drop-down menu.

Click on this button to create the element and close the dialog.

Cancel

Click on this button to abort the changes and close the dialog without creating an element.

Notes

  • The 'New Element' dialog also displays when you create an element in the Specification Manager, if the Specification Type is <Any>

Learn more