Book a Demo

Author Topic: Derived Tagged Values  (Read 5731 times)

Amy_N

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Derived Tagged Values
« on: May 27, 2015, 09:50:33 pm »
I am in the process of developing an MDG technology for my project. This includes assigning a number of tagged values to my stereotypes. I would like some of these to either auto-populate with a value or change the enumeration options after the user has selected values for other tags.

I am comfortable creating new tags based on my custom enumerations and getting the shape to change if certain tags are changed to particular values (using the shape script). However I can't seem to figure out how to pass data between tags (in the same element), create derived tagged values or change which enumeration is assigned based on a condition.

For example lets say I'm modelling pets. The user can choose an animal from an enumeration e.g.
* Species (enumeration) Cat, Dog, Rodent, Snake, Lizard, Parrot

Question 1: I would then like the tagged value 'group' to be auto-populated based on their species selection
* Group (auto-assigned) Mammal, Reptile, Fish, Bird

Question 2: I would like the tagged value 'Animal' to offer specific enumerated values based on their species selection
* Animal (user selects Rodent as species) - enumeration values offered are: Hamster, Rat, Gerbil
* Animal (user selects Dog as Species) - enumeration values offered are: Labrador, Pug, Spaniel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Derived Tagged Values
« Reply #1 on: May 27, 2015, 10:21:56 pm »
Amy,

You probably need an MDG addin to do something like that.

This addin will allow you to react to events such as changing a tagged value, and make the required changes to the other tagged values.

If you don't want or are not allowed to create an add-in then you can also use EA-Maticto do the same using the build-in scripting module.

You can eihter include those scripts in the MDG technology file, store them in the model, or store them in local scripts folder in the EA installation folder.

Geert

Amy_N

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Derived Tagged Values
« Reply #2 on: May 28, 2015, 08:34:37 pm »
I was worried that may be the case  :'( Haven't done any scripting in EA yet (but I have done VBA and C++ before). Will I have to use the Automation interface? I can't seem to work out how to access it.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Derived Tagged Values
« Reply #3 on: May 28, 2015, 09:03:12 pm »
If you want to use scripting I can recommend the webinar on that subject.
If you want to do an addin then you might want to read the various articles I wrote about that at http://bellekens.com/writing-ea-add-ins/

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Derived Tagged Values
« Reply #4 on: May 28, 2015, 09:15:25 pm »
Even easier would be to use Geert's EA-Matic since you can write the add-in from right inside of EA.

q.

Amy_N

  • EA User
  • **
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Derived Tagged Values
« Reply #5 on: May 28, 2015, 09:33:01 pm »
Great thanks guys, I'll do some reading and look at EA Matic  :)