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 (these are listed below). Alternatively, if a custom diagram type is required, it should be prefixed with the diagram profile name and '::'.

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

MetaclassesWithDefaultDiagramType

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

Values For _defaultDiagramType

The following initial values 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.