Prev Next

Create Custom Diagram Profiles

When you develop an MDG Technology, it is possible to create extended diagram types and include them in your MDG Technology as custom Diagram Profiles. For example, you might create a DFD Diagram Profile that defines a DFD diagram as an extension of the built-in Analysis diagram, as shown:

Create extended diagram types

Step

Action

See also

1

Create a Profile, with the same name as the MDG Technology in which it is to be included; for example, SysML.

This Profile automatically contains one child Class diagram. Depending on how many new diagram types you intend to create, you can define:

  • One diagram type on one child diagram
  • Several diagram types on one diagram, or
  • Several diagram types grouped on several diagrams

In the third case, create any further child Class diagrams you need. The diagram names do not have to reflect the technology name.

Create a Profile Package

2

Open the child Class diagram and create a Stereotype element, giving it the name of the Custom diagram type; for example, BlockDefinition.

Also on the Stereotype element 'Properties' dialog, in the 'Notes' field, type a brief description of what the diagram is used for.

When the Technology is deployed and a diagram of this Custom type is being created, this description will display in the bottom right-hand corner of the 'New Diagram' dialog.

Add Stereotypes and Metaclasses

3

Create a Metaclass element and give it the name of the selected built-in diagram type, with the prefix Diagram_.

For example Diagram_Logical to customize the Class diagram type, or Diagram_Use Case to  customize the Use Case diagram type.

Built-In Diagram Types

4

Drag an Extension connector from the Stereotype element to the Metaclass element.

5

Click on the Diagram_xxxx Metaclass element, press F9 and create any or all of these attributes, to set properties of the Custom diagram type:

  • alias: string = Type (where Type will appear before the word 'Diagram' on the diagram title bar; for example, 'Block Diagram')
  • diagramID: string = abc (where abc is the diagram type that will appear in the diagram frame label)
  • toolbox: string = ToolboxName (where ToolboxName is the name of the Toolbox Profile for the Toolbox that opens automatically each time a diagram of this type is opened)
  • toolboxPage: string = list of status values in the form "PageName=1;" (where PageName is the name of the stereotype element that extends ToolboxPage; if this string is not empty, all toolbox pages with the value "1" will be expanded and all other toolbox pages will be collapsed)
  • frameString: string = FrameFormatString (where FrameFormatString is a string containing substitution macros for defining the frame title, with or without additional delimiters such as (); macros that can be used are:
         -  #DGMALIAS#
         -  #DGMID#
         -  #DGMNAME#
         -  #DGMNAMEFULL#
         -  #DGMOWNERNAME#
         -  #DGMOWNERNAMEFULL#
         -  #DGMOWNERTYPE#
         -  #DGMSTEREO#
         -  #DGMTYPE#
  • swimlanes: string = Lanes=2;Orientation=Horizontal;Lane1=Title1;Lane2=Title2; (where Lanes can be any value, but the number of Lane<n> values must equal the value of Lanes; Orientation can be omitted, in which case the swimlanes default to vertical)
  • styleex: string = one or more of a range of values
  • pdata: string = one or more of a range of values
Diagram Frame Attribute Values - styleex & pdata

6

Depending on what Profile Package organization you adopted at step 1, and whether you need any further Stereotype-Metaclass element pairs, repeat steps 2 - 5 on this diagram or on another child diagram.

7

Save the diagram(s) as a Diagram Profile, using the method most appropriate to the Profile Package organization you have set up.

Export a Profile

8

Add the Diagram Profile(s) to the .mts file used in the MDG Technology.

Add a Diagram Profile