Author Topic: MDG Custom Diagram - does not set diagram type or diagram stereotype?  (Read 227 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 104
  • Karma: +0/-1
  • Business Information Architect
    • View Profile
I created a custom diagram type in an MDG.

When I use the MDG, I can select my custom diagram type when I create a new diagram
BUT:
  • The new diagram does not get a customized type - it is still just "Component"
  • The new diagram does not get a customized stereotype - it is still blank in the stereoype
  • If I try to change the stereotype in the properties field, my new stereotype does not show up
  • The new diagram does not get a customized stereotype (in diagram peoperties window) - it is still blank in the stereoype
If I go to Design/Diagram/Manage/Change type... - then I can actually choose my new diagram type, but I still don't see any change in the diagram's type og stereotype.
The diagram pane's title bar does show the new customized stereotype though (<Steretype> diagram: <name>
EA also presents the associated toolboxes correctly
Does EA not set diagram type and stereotype in the usual fields (Diagram_Type and Stereotype) for a customized diagram?
I can see that it does include the name of my customized stereotype (CityMap) in the field StyleEx:
"MDGDgm=CPH_MetaModel::CityMap;HideQuals=0;HideConnStereotype=0;"

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #1 on: November 10, 2017, 04:27:06 am »
I'm pretty sure what you saw is normal behavior for EA.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8900
  • Karma: +134/-122
  • I'm no guru at all
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #2 on: November 10, 2017, 08:09:05 am »
If you create any diagram from BPMN you see that they are Analysis diagrams and don't have a stereotype. It's only that EA knows the meta-type and associates a toolbox with the diagram.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5851
  • Karma: +71/-75
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #3 on: November 10, 2017, 11:00:19 am »
If you create any diagram from BPMN you see that they are Analysis diagrams and don't have a stereotype. It's only that EA knows the meta-type and associates a toolbox with the diagram.

q.
Because Diagrams are 2nd (or lower) class citizens of the sparxian ecosystem, a diagram metatype is NOT a combination of Type and Stereotype, but just an entry in StylEx (as noted by the OP).

Getting Diagram stereotypes to appear in the dropdown has been problematic for us.  IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 104
  • Karma: +0/-1
  • Business Information Architect
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #4 on: November 10, 2017, 10:55:33 pm »
IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.

But that will not associate the MDG's diagram type with the general stereotype - correct?

Is there any way to add a stereotype (possibly as a default value) from within the MDG, to elements created from the MDG's diagram type?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #5 on: November 10, 2017, 11:19:15 pm »
IIRC we found we had to place them in the General stereotypes list with a base class of Diagram to get them to show up.

But that will not associate the MDG's diagram type with the general stereotype - correct?

Is there any way to add a stereotype (possibly as a default value) from within the MDG, to elements created from the MDG's diagram type?
I'm sorry I don't understand what you mean with "elements created from the MDG's diagram type"

Geert

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 104
  • Karma: +0/-1
  • Business Information Architect
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #6 on: November 11, 2017, 12:51:45 am »
I'm sorry I don't understand what you mean with "elements created from the MDG's diagram type"
Geert

Yeah, that was a bit of fast typing, sorry.

I mean:

I create a customized diagram type "CityMap" in my MDG.
Then, when the user creates a new CityMap diagram, I want EA to set the diagram's stereotype to "CityMap"
Is there any way, I can specify in my MDG, that the diagram should automatically be given the stereotype "CityMap" - for instance, can I, in my MDG, specify a default value for the Stereotype property?











Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #7 on: November 11, 2017, 06:49:14 pm »
Ah, thanks that makes more sense.

No I don't think you can, but diagram stereotypes aren't really valid UML constructs you know.

Why is it so important that you have a stereotype on your diagrams? I've done a number of MDG with diagram types, and I never really felt the need for stereotypes.

What would be nice is if we could specify our own icon for a diagram. That would visually set them apart from the other diagrams.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8900
  • Karma: +134/-122
  • I'm no guru at all
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #8 on: November 11, 2017, 10:56:28 pm »
What would be nice is if we could specify our own icon for a diagram.

+1

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5851
  • Karma: +71/-75
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #9 on: November 13, 2017, 12:06:43 pm »
What would be nice is if we could specify our own icon for a diagram.

+1
+1

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 104
  • Karma: +0/-1
  • Business Information Architect
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #10 on: November 15, 2017, 05:06:28 am »
Why is it so important that you have a stereotype on your diagrams?

  • Searching
  • Reporting
  • Applying logic/rules/quality checks
  • ...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #11 on: November 15, 2017, 03:47:58 pm »
Can't you do all of that without the stereotype as well?

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8900
  • Karma: +134/-122
  • I'm no guru at all
    • View Profile
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #12 on: November 15, 2017, 08:12:11 pm »
Yes, but it's inconvenient (due to inconsistency). You need to look after the "stereotype" of a diagram in StyleEx in the MDGDgm tag.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7671
  • Karma: +156/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Custom Diagram - does not set diagram type or diagram stereotype?
« Reply #13 on: November 15, 2017, 10:38:38 pm »
Yes, but it's inconvenient (due to inconsistency). You need to look after the "stereotype" of a diagram in StyleEx in the MDGDgm tag.

q.

No argue with that.

Geert