Author Topic: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled  (Read 6301 times)

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« on: March 27, 2021, 08:22:03 pm »
I am building a bespoke MDG Technology.

I have previously built a number of MDGs so am happy with the process.

To get a standard Class diagram within my MDG I have a package <<diagram profile>> within which is a stereotype of <<my_diagram_name>> that extends to a metaclass named "Diagram_Logical".

That is all quite successful.

However, I need to include a roadmap diagram, i.e. a Class diagram where as soon as it is instantiated, it automatically has the roadmap timeline displayed at the top, and a pre-defined Legend displayed on the diagram. Better still if there are a couple of horizontal swimlanes.

Doing this all manually is obviously straightforward, but I need a novice user to be presented with the arranged diagram.

I cannot figure out (a) if it is possible, and (b) which attributes I should set either in the stereotype or the metaclass to make this happen.

Can anyone help, please?

Many thanks in advance.

--------------------------------------------------------------

Edited to add a link to a picture of the roadmap format, with a couple of elements dragged onto it.



Gave up with Dropbox, now using imgbb.com
« Last Edit: March 27, 2021, 09:38:23 pm by ZuluTen »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #1 on: March 27, 2021, 09:20:25 pm »
Actually you can link to dropbox. I did so in the past. People behind some firewalls might not be able to see it, though.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13378
  • Karma: +563/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #2 on: March 27, 2021, 10:35:42 pm »
You may need a pattern to pull that off.

Geert

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #3 on: March 28, 2021, 10:43:53 pm »
You may need a pattern to pull that off.

Geert

Thank you for the suggestion.

I've wasted spent all of Sunday morning trying to crack this and am getting nowhere:

Am I being stupid?

My imported pattern does contain the project (object) element, my note from the original diagram, and the legend.

Unfortunately, unlike the original diagram from which the pattern was published, the roadmap enabled flag doesn't get asserted, so the timeline doesn't get automatically displayed. Also the "Use Legend for Phase Colors" doesn't get set either.

Am I missing something obvious?

Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #4 on: March 29, 2021, 08:08:43 am »
Am I being stupid?

No


Am I missing something obvious?


There are two kinds of pattern. You are creating a diagram pattern; what you need is a model wizard pattern. Create a roadmap diagram in a package, export the package as XMI, then add a <ModelTemplates> section to your technology to point the model wizard at your XMI file. Here's the help page:

https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/model_templates2.html
The Sparx Team
[email protected]

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #5 on: March 29, 2021, 06:41:08 pm »
Am I being stupid?

No


Am I missing something obvious?


There are two kinds of pattern. You are creating a diagram pattern; what you need is a model wizard pattern. Create a roadmap diagram in a package, export the package as XMI, then add a <ModelTemplates> section to your technology to point the model wizard at your XMI file. Here's the help page:

https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/model_templates2.html

Ah ha. Many thanks for explaining the difference.

I ran through the process and as you say that makes perfect sense, and despite having to edit the .mts file manually, is quite straightforward, but...it means that I end up with a new package, as well as a new Roadmap diagram.

Is there a way to just get the new pre-formatted diagram without the associated package?

What I mean is that when, inside a package, I select 'Add Diagram' and amongst the menu options are the diagrams contained in my MDG's <<diagram profile>>, is it possible for one of them to be generated with Roadmap Enabled=True and Use Legend For Phase Colours = True having been pre-selected?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13378
  • Karma: +563/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #6 on: March 29, 2021, 07:05:03 pm »
What I mean is that when, inside a package, I select 'Add Diagram' and amongst the menu options are the diagrams contained in my MDG's <<diagram profile>>, is it possible for one of them to be generated with Roadmap Enabled=True and Use Legend For Phase Colours = True having been pre-selected?
You might need to use the template package for these properties.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #7 on: March 30, 2021, 09:56:20 am »
It appears that all the roadmap info is saved in the StyleEx field. I just tried it and got the following added
Code: [Select]
Roadmap=RF=32779:TS=10:TLH=80:SD=2021-03-30 09_47_13:ED=2021-03-30 09_47_13:CustOpts=;
I don't know what any of it means, but you could try adding that to the styleex attribute for your custom diagram type and see if it works. Alternately, create a diagram in an empty model, set the diagram up how you want it, and do a SELECT StyleEx FROM t_diagram in the SQL Scratch Pad and see what you get. Let us know how you get on.
The Sparx Team
[email protected]

philchudley

  • EA User
  • **
  • Posts: 741
  • Karma: +20/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: MDG - Custom Diagram with Roadmap/Legend Pre-Enabled
« Reply #8 on: March 30, 2021, 07:38:32 pm »
KP suggestion is certainly worth a try

I used this trick in an MDG to set the Filter to Version and Filter to New properties for a custom diagram in the MDG and it worked perfectly.

Select the Diagram Metaclass which your diagram stereotype is extending in the MDG and open the Features window
Enter the desired string for StyleEx in the Initial Value for the Attribute styleex (You may have to add this attribute if not present already and note the spelling and case)

Just a matter of working out the value in StyleEx and KP has given you the SQL for that


Phil
Models are great!
Correct models are even greater!