Define Child Diagram Types

The _defaultDiagramType attribute is applied to a metaclass element, not a stereotype element. It defines the type of diagram created when an element is made composite.

This attribute can take as its name any of the inbuilt diagram types of Enterprise Architect as listed below.

Alternatively, if a custom diagram type is required, it should be prefixed with the diagram profile name and '::'.  The diagram profile name is the name given to the profile when you save it, which by default is the name of the profile package or profile diagram. If you follow the recommendation in Create Diagram Profiles, the diagram profile name is based on the technology name, but be aware that the attribute prefix is not a direct reference to the technology name.

The following examples show a BusinessProcessActivity that, when made a composite element, automatically creates an Analysis diagram, and a block stereotype that creates a SysML InternalBlock custom diagram.


You can also use the _defaultDiagramType attribute for packages, extending the Package metaclass.

Initial Values:

The following initial values for _defaultDiagramType should be used to refer to Enterprise Architect's inbuilt diagram types:

  • UML Behavioral::Use Case
  • UML Behavioral::Activity
  • UML Behavioral::State Machine
  • UML Behavioral::Communication
  • UML Behavioral::Sequence
  • UML Behavioral::Timing
  • UML Behavioral::Interaction Overview
  • UML Structural::Package
  • UML Structural::Class
  • UML Structural::Object
  • UML Structural::Composite Structure
  • UML Structural::Component
  • UML Structural::Deployment
  • Extended::Custom
  • Extended::Requirements
  • Extended::Maintenance
  • Extended::Analysis
  • Extended::User Interface
  • Extended::Data Modeling
  • Extended::ModelDocument.

Learn More: