Author Topic: Extending non-UML diagram types  (Read 1451 times)

Polymorph

  • EA User
  • **
  • Posts: 120
  • Karma: +4/-0
    • View Profile
Extending non-UML diagram types
« on: August 09, 2016, 01:48:55 am »
I am creating an MDG Technology following http://www.sparxsystems.com/resources/demos/profile-helpers/profile-helpers.htm and http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/custom_diagram_types.html as guides

I have read that it is only possible to extend EA's basic built-in diagram types (see http://sparxsystems.com/forums/smf/index.php/topic,30151.msg220401.html#msg220401) - so, if I want to extend SysML Block Definition Diagram (BDD), I must start with a class diagram and modify it as necessary

Having defined a new diagram type, I want to specify a toolbox to use with it.

The help describes how you can include elements from other MDG technologies:
http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/create_toolbox_profiles_using_.html

Quote
(Optional) Define a Toolbox item that will create an item from an external MDG Technology. For example, adding a Toolbox item that creates a SysML1.3 Block element.
Click on the down-arrow on the right of the Add button.
Select the 'Add New Item' option.
The 'Create new Toolbox Item' dialog displays.
In the 'Alias' field, type the label to appear on the Toolbox item, and click on the OK button.
The Toolbox item will be added to the 'Toolbox Items' list.
In the 'Stereotype' field for this Toolbox item, type:
     Profile::Stereotype(UML::BaseUMLType)
     -  Profile is the name of the Profile that the Stereotype is defined in
     -  Stereotype is the name of the Stereotype/Metatype that this toolbox item will create
     -  BaseUMLType is the base UML type of the non-UML object
For example, to include a SysML Block in a Toolbox you would type:
     SysML1.3::Block(UML::Class)
To identify the Profile::Stereotype string, create an element of the type to include in your Toolbox (for example; a SysML 1.3 Block), then select the element and display the Tagged Values window.
Any predefined tags for this element will be grouped under the Profile::Stereotype heading; for example, a SysML 1.3 Block's tags are grouped under SysML1.3::Block.
All non-UML objects in Enterprise Architect are an extension of a UML Type. You can reveal an element's base UML type by deleting its Stereotypes. For example, create a SysML1.3 Block and then, using the Properties Window, delete the Block element's Stereotype. The element type will change from Block to Class.

Does anyone know if you can re-use an entire toolbox from another MDG, rather than individually listing the elements to include within it? For example, can I re-use the SysML Block Definition Diagram toolbox in my custom toolbox?

qwerty

  • EA Guru
  • *****
  • Posts: 8968
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Extending non-UML diagram types
« Reply #1 on: August 09, 2016, 02:09:34 am »
You can't. You need to build a copy of the toolbox.

q.

PeterHeintz

  • EA User
  • **
  • Posts: 549
  • Karma: +37/-14
    • View Profile
Re: Extending non-UML diagram types
« Reply #2 on: August 09, 2016, 02:21:05 am »
Hi Polymorph,
yes, you can do that!

In your diagram meta class under "toolbox"/"Toolbox Profile"(Edit with Profile Helper) you have to insert e.g.:

SysML1.3_Interaction
SysML1.3_State
SysML1.3_Activity
SysML1.3_BlockDefinition

Best regards,

Peter Heintz

Polymorph

  • EA User
  • **
  • Posts: 120
  • Karma: +4/-0
    • View Profile
Re: Extending non-UML diagram types
« Reply #3 on: August 09, 2016, 06:12:52 pm »
Excellent! Thanks very much. How do you find the name of the toolbox? (Obviously I could guess the name as I assume they follow a pretty standard pattern - but MDG technology development involves more than enough guess-work already!)

qwerty

  • EA Guru
  • *****
  • Posts: 8968
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Extending non-UML diagram types
« Reply #4 on: August 09, 2016, 06:37:00 pm »
You can edit the MDG files. They are located in the according MDG folder in EA's program directory.

q.

PeterHeintz

  • EA User
  • **
  • Posts: 549
  • Karma: +37/-14
    • View Profile
Re: Extending non-UML diagram types
« Reply #5 on: August 09, 2016, 08:01:57 pm »
As I remember it was more a guess, but maybe you find it the way suggested by qwerty.
Best regards,

Peter Heintz

Polymorph

  • EA User
  • **
  • Posts: 120
  • Karma: +4/-0
    • View Profile
Re: Extending non-UML diagram types
« Reply #6 on: August 10, 2016, 12:21:56 am »
Some diagram types have different behaviours depending on whether they are the (native) UML or (MDG-based) SysML. For example, if you create a SysML activity diagram, you can right-click on the background of the diagram and choose to either Show or Hide the diagram background:



This is very useful because it allows you to show things like SysML Activity Parameters on the boundary of the diagram. Therefore, when I create a customised diagram based on the native UML Activity diagram I can't turn the frame on/off...

Does anyone know how to make it do this (I fear it is not possible  :()