Author Topic: Working with TaggedValues of stereotypes and mathematical expressions  (Read 2420 times)

vrieg

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Hello,
I have a rather complex metamodel with an mdg and c# scripts for automation to generate model-elements based on the metamodels stereotypes and relationships.
Now I would like to do calculations and evaluations based on the created data inside the model and make use of their relation.
Is there a good way to for example read the tagged values of element a tag1 and tag2 build the sum tag3=tag1+tag2 and updated tag3 based on the calculation.
In case one of the tags1 or tag2 change i would like to do a re calculation of tag3.
can i show this updated tag3 in a diagram or a user form?
In the end I think I should iterate through the model, do several calculations and then provide an report in textual format.

Any idea how to approach this?
I thought about addinn scripts and maybe something like ea-matic but maybe there are better approaches?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Working with TaggedValues of stereotypes and mathematical expressions
« Reply #1 on: August 27, 2024, 07:18:28 pm »
I guess there is nothing else than what you thought about.

q.

ea0522

  • EA User
  • **
  • Posts: 134
  • Karma: +5/-0
    • View Profile
Re: Working with TaggedValues of stereotypes and mathematical expressions
« Reply #2 on: August 27, 2024, 07:54:31 pm »
Don't know how much elements you need to report.
In case there are not that many, you may want to consider showing them on a diagram and use a legend to visualize the different values of tag3.
There is a diagram layout option to automatically layout all elements, sorted by e.g. Name.
There is also a script to update the legend to show all values used for the tag3 defined in the legend.

For this diagram you could create a script to be activated when on the diagram.
You could probably even create a script which is run automatically when the diagram is changed.

HTH

vrieg

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Working with TaggedValues of stereotypes and mathematical expressions
« Reply #3 on: August 27, 2024, 10:40:25 pm »
i think the model can get rather complex so ok this seems to be the way to do it.
thanks a lot.