Book a Demo

Author Topic: Via MDG: attribute stereotype fixed based on element stereotype?  (Read 5744 times)

Jacob Vos

  • EA User
  • **
  • Posts: 108
  • Karma: +0/-0
    • View Profile
Via MDG: attribute stereotype fixed based on element stereotype?
« on: December 23, 2021, 02:46:19 am »
In an MDG I have the element type 'Objecttype' (metaclass: UML::Class). And I have the element type 'AttributeKind' (metaclass: UML::Attribute).

What I want to realize, is that when somebody has added an element of type 'Objecttype' to a model, and then adds attributes to it (NOT by dragging/dropping from toolbox to element), those attributes are automatically stereotyped as 'AttributeKind'.

Is this possible? And how?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Via MDG: attribute stereotype fixed based on element stereotype?
« Reply #1 on: December 23, 2021, 03:26:40 am »
I would think you need an add-in handle the On_New event...

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Via MDG: attribute stereotype fixed based on element stereotype?
« Reply #2 on: December 24, 2021, 03:13:03 am »
Hi Jacob,

I had a similar issue and the only solution I found was to use Project Template packages (https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/using_element_templates.html).

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com