Author Topic: Adding Memos as a MDG  (Read 5811 times)

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Adding Memos as a MDG
« on: May 01, 2017, 02:51:01 pm »
Hello,
We have been using  an MDG script that I developed a couple of years ago to generate our own symbology for our own framework.

We have a large demand however for a Notes field in the element, similar to the one that comes up when you double-click any element, but for non-formal technical comments that we don't want to publish in the document generator.

Does anyone know if there is a way to do this in the MDG? it could be a tag for example that when you click on it, provides a memo object.
many thanks,
David


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Adding Memos as a MDG
« Reply #1 on: May 01, 2017, 04:52:24 pm »
Yes, David, that's one way to do it.

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

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Adding Memos as a MDG
« Reply #2 on: May 02, 2017, 07:13:36 am »
Here is how I do it.
1) Create tagged value type via config tab>Reference Data>UML Types like so
Name: MemoField
Details: Type=Memo; BaseStereotype=Class;

2) In your MDG stereotype add attribute with these details
Name:<MDG_ID>::MemoField
Type: MemoField

Where <MDG_ID> should be the ID you have for your MDG.
Note the the name has to match the UML Type name for this to work. The type doesn't seem to have any effect but I set it so I can figure out what it was.

3) When generating MDG select the UML Type MemoField to export into the MDG file.

Its a bit of a pain that you have to define a tagged value type for each attribute even though they may be all of type memo but that's how Sparx EA works. Hope that helps.
« Last Edit: May 02, 2017, 07:18:02 am by Sunshine »
Happy to help
:)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Adding Memos as a MDG
« Reply #3 on: May 02, 2017, 01:25:18 pm »
There's a quicker way: add an attribute to your stereotype class with initial value set to '<memo>'.
The Sparx Team
[email protected]

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Adding Memos as a MDG
« Reply #4 on: May 02, 2017, 08:04:35 pm »
@KP Now thats interesting to know. Does it work for dates too? For example just set the initial value to '<date>'
Happy to help
:)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Adding Memos as a MDG
« Reply #5 on: May 02, 2017, 08:39:14 pm »
No. That only works for <memo>. You can try it manually (type <memo> in the TV value).

q.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1324
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Adding Memos as a MDG
« Reply #6 on: May 03, 2017, 09:21:45 am »
No. That only works for <memo>. You can try it manually (type <memo> in the TV value).

q.

Well that's just typical inconsistency isn't it?

Shame that by setting the type on attribute in the stereotype in the MDG you can't specify date, memo, spin etc just to be consistent.
« Last Edit: May 04, 2017, 12:24:21 pm by Sunshine »
Happy to help
:)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Adding Memos as a MDG
« Reply #7 on: May 03, 2017, 06:15:08 pm »
It's EA, isn't it?

q.