Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Contents
Prev Next

Create Toolbox Profiles

Within an MDG Technology you can create multiple Toolbox Profiles. Each Toolbox Profile contains definitions that determine what pages appear in the Toolbox when it is opened, either by selection from the 'More tools...' option in the Diagram Toolbox, or by opening or creating a diagram of the type that is linked to the Toolbox Profile.

Create a Toolbox Profile

Step

Action

See also

1

In a Profile Package, create a Class diagram with an appropriate name by which you can refer to it later, such as MyClassDiagram.

Create a Profile Package

2

Double-click on the diagram background to display the diagram 'Properties' dialog and, in the 'Notes' field, give the diagram an alias and a description in this format:

     Alias=MyClass;Notes=Structural elements for Class diagrams;

3

On the diagram, create a Metaclass element with the name ToolboxPage.

Add Stereotypes and Metaclasses

4

Create a Stereotype element for each of the Toolbox pages to create within your Toolbox, such as MyClassElements and MyClassRelationships.

Double-click on each element to display the 'Properties' dialog and, in the 'Alias' field, type the text to display in the title bar of the corresponding Toolbox page, such as My Classes or My Class Relationships.

In the 'Notes' field of each element, type the tool-tip for the corresponding Toolbox page; for example, 'Elements for Class Diagrams' or 'Relationships for Class Diagrams'.

Create an Extension connector between each Stereotype element and the ToolboxPage Metaclass element.

5

In each of the Stereotype elements, press F9 and create an attribute for each Toolbox item in the page defined by that element.

The name of each attribute is the name of the element or connector to be dropped, including the element's namespace; for example, UML::Package, UML::Class and UML::Interface. You might not want to display names including text such as UML::Package or UML::Class in your Toolbox, so give the attributes an 'Initial Value' of, for example, Package or Class.

The Toolbox items display in the same sequence as their attributes in the element, so use the attribute ordering options in the 'Attributes' page of the 'Features' dialog to define the order of icons in your Toolbox page.

In the name of an attribute for an element or connector from your own technology, use your Profile name as the namespace, and then follow the item name with the element or connector type that you are extending, in brackets (to identify to Enterprise Architect what type of object to create); for example, a SysML Block element would appear as:

     SysML::Block(UML::Class)

Many elements and connectors can be extended for use in Toolboxes.

Elements Used in Toolboxes Connectors Used in Toolboxes Create and Manage Attributes

6

To define a Toolbox item to drop a Pattern onto a diagram, name the attribute:

     My Technology::MyPattern(EAPattern)

'MyTechnology' is the ID of the technology and 'MyPattern' is the name of the Pattern to drop; for example:

     BusFramework::Builder(EAPattern)

If you want to avoid displaying the 'Add Pattern' dialog, replace (EAPattern) with (EAPatternSilent).

To define a model-based Pattern in a custom Toolbox (such as the GoF Patterns), create an attribute with a name of the format:

     PatternCategory::PatternName(EAPattern)

For example:

     GoF Behavioral Patterns::Mediator(EAPattern)

7

Define any attributes you need to modify the display of the Toolbox pages, such as whether the Toolbox pages are minimized or displayed without item names (labels).

Toolbox Page Attributes

8

To save the Toolbox profile, right-click on the diagram and select the 'Save as Profile' option.

Export a Profile

Toolbox Profile Errors

When a Diagram Toolbox defined in your MDG Technology is in use, certain error messages might be displayed. This table explains what those error messages mean.

Message

Meaning

Missing base type <name>

For example: 'Missing base type: 'SysML1.3::Block' does not extend 'UML::State'

The base type is either missing or does not correspond to the extended element type (in the example, SysML::Block actually extends UML::Class).

No profile found with id <name>

This error message could mean that the profile cannot be found, or that the MDG Technology containing the profile has been disabled (check using 'Configure > Technology > Manage').

No stereotype <name> found in profile <name>

For example: 'No stereotype 'ProxyPort' found in profile 'SysML 1.2'.

This message indicates that there is a mismatch between the stereotype required and the profile it is supposed to be in. In the example, SysML1.2 does not have ProxyPorts, so perhaps the stereotype should be 'FlowPort', or the profile 'SysML 1.3'.

Unknown/Illegal base type: <name>

There can be a number of reasons for this message being displayed. For example:

  • Unknown/Illegal base type: UML::Capability - displayed because there is no such UML metaclass as 'Capability'
  • Unknown/Illegal base type: SysML 1.3::Block - displayed because you are trying to extend a stereotype from another profile, in this case <<Block>> from the SysML 1.3 profile; you must extend the same thing as the stereotype you are specializing extends (in this case 'UML::Class')

Notes

  • When assigning an Alias for a Toolbox page, 'elements' is a reserved word; if the word 'elements' is used, it will not appear in the title bar of the corresponding Toolbox page
  • Each Profile element incorporated into an MDG Toolbox page enables a context menu option to synchronize the Tagged Values and Constraints of all objects created from it
  • The sequence of Toolbox pages in the Toolbox is determined by the sequence of their Stereotype elements in the Profile diagram or Profile Package; if you create and save the Profile from a:
         -  Diagram, the Toolbox page sequence is determined by the Z-order of the Stereotype elements on the diagram - the
            lower (closer to 1) the Z-order number of the Stereotype element (the closer it is to the 'surface' of the diagram),
            the further down the Toolbox its Toolbox page is placed; if you change the Z-order of a Stereotype element in the
            diagram, it changes the position of the element's page on the Toolbox
         -  Package in the Project Browser, the Toolbox page sequence is determined by the list order of the Stereotype
            elements in the Package - the Toolbox page for the first listed element is at the top of the Toolbox; if you re-order
            the elements in the Project Browser, you produce the same re-ordering of pages in the Toolbox

Learn more