Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: DavidM 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
-
Yes, David, that's one way to do it.
Paolo
-
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.
-
There's a quicker way: add an attribute to your stereotype class with initial value set to '<memo>'.
-
@KP Now thats interesting to know. Does it work for dates too? For example just set the initial value to '<date>'
-
No. That only works for <memo>. You can try it manually (type <memo> in the TV value).
q.
-
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.
-
It's EA, isn't it?
q.