Book a Demo

Author Topic: Change Appearence by Value of a Tag  (Read 3144 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Change Appearence by Value of a Tag
« on: September 09, 2020, 02:53:41 am »
I have seen once that it is possible to change the enumerated value of a tag on an element, the element is changing its appearance, e.g. the boarder color.
I am using stereotypes in profiles exposing attributes as tags a lot, but have less experience in using Predefined Structured Types.
However, I was not able to find it in the User Manual.

Can you point me to the description how to influence the appearance of an element on a diagram by changing the value of a tag?
Rolf

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Change Appearence by Value of a Tag
« Reply #1 on: September 09, 2020, 06:53:31 am »
Simply you wirite a shape script for it and put it in the _image property. The SS uses HasTag("name", "value") in order to test for different values and alters the shape accordingly.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Change Appearence by Value of a Tag
« Reply #2 on: September 09, 2020, 07:55:31 am »
Qwerty's answer works. Alternatively, you can use a Diagram Legend: tick "Apply auto color" and select a tagged value for the Filter.
The Sparx Team
[email protected]

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: Change Appearence by Value of a Tag
« Reply #3 on: September 09, 2020, 08:33:35 am »
thank you KP, that was what I was looking for.
However, I read the answer of qwerty first and found the place in the User Manual.
Now, that know it, it seems to me more flexible.

It works great!
Rolf