Book a Demo

Author Topic: Set diagram type for composite diagram in MDG  (Read 4441 times)

beginner

  • Guest
Set diagram type for composite diagram in MDG
« on: August 04, 2010, 07:19:47 pm »
I wonder whether it is possible to (easily) set the diagram type of a diagram which you create via Advanced/Composite. There seems to be some kind of rule behind it (e.g. UC create UC diagrams, Classes create Composite). I wanted to have my own diagram for certain stereotyped classes of my MDG profile.

b.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Set diagram type for composite diagram in MDG
« Reply #1 on: August 04, 2010, 09:22:01 pm »
Hi b,

did you try _DefaultDiagramType applied to the metatype?

Help: _DefaultDiagramType     Used for defining child diagram types.

I haven't used it myself, but it seems to "fit the bill".

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

beginner

  • Guest
Re: Set diagram type for composite diagram in MDG
« Reply #2 on: August 06, 2010, 09:49:21 pm »
Yep. Thanks for the pointer. I'll try that out.

b.

Nope. Does not work. At least I could not get it to work. No chance to set one of my diagrams as default. I tried with a stereotyped class but that created only CompositeStructure.

The only thing I found out is that _makeComposite is not inherited from another stereotype (which is also the case for the _sizeX/Y which I reported eons ago but has not been fixed yet). May some other soul take care of this bug.
« Last Edit: August 06, 2010, 10:42:28 pm by beginner »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Set diagram type for composite diagram in MDG
« Reply #3 on: August 09, 2010, 08:33:04 am »
All _makeComposite and _defaultDiagramType don't go on the stereotype.  They go on the metaclass.

beginner

  • Guest
Re: Set diagram type for composite diagram in MDG
« Reply #4 on: August 10, 2010, 06:27:43 pm »
I can read the help. I like the help since it's in almost all cases helpful. I don't like that quite some things do not work in EA.

b.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Set diagram type for composite diagram in MDG
« Reply #5 on: August 11, 2010, 11:53:50 am »
Quote
I can read the help.
Does this mean you've read the help and got it working, or read the help and it still doesn't work? If the latter, please put in a support request and we'll figure out how to get it working (please attach your technology file).

PS The commonest problem I encounter is that you need to set _defaultDiagramType to "DiagramProfileName::DiagramType" not "TechnologyName::DiagramType".
« Last Edit: August 11, 2010, 11:54:10 am by KP »
The Sparx Team
[email protected]

beginner

  • Guest
Re: Set diagram type for composite diagram in MDG
« Reply #6 on: August 12, 2010, 01:20:34 am »
Hi Neil,
I read the help (as I got the pointer from Paolo) and tried as written, but it did not work. I used the of course ProfileName since it was not obvious from the help and I used it this way in the Toolbox. I will try with DiagramProfileName, though I'm not quite sure what that would be.  

b.

[edit] I tried to add Extended::Analysis (like in the help) for metaclass Object. But again I get a CompositeStructure diagram. I'll send the MDG...

[edit2] Seems like the problem was located in front of the keyboard. After feedback from Sparx' support I got it to work. Even the example did work today. The diagram profile name is that of the <<profile>> package where the diagrams are stored.
« Last Edit: August 13, 2010, 06:13:52 pm by beginner »