Author Topic: Toolbox icon based on attribute value  (Read 1708 times)

ewo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Toolbox icon based on attribute value
« on: February 15, 2023, 10:46:48 pm »
Dear All,

I would like to ask whether it is possible to introduce under the same toolbox, the same stereotype element several times, but with a different icon, where the icon changes based on a value of the stereotype attribute of type enum.

For instance:
1. stereotype "HwElement" which has an attribute "hwKind" of type enum which has following literals ("SENSOR", "ACTUATOR", "CPU", etc.)
2. The toolbox shall now provide these different options, each with a different icon.
3. I would like to avoid creating stereotype for each of this HwElement kinds, but instead rely on the enum.

Thank you!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Toolbox icon based on attribute value
« Reply #1 on: February 15, 2023, 11:08:10 pm »
No. You probably can use an add-script to create dedicated elements.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Toolbox icon based on attribute value
« Reply #2 on: February 15, 2023, 11:08:36 pm »
I don't think that's possible, but you can define a tagged value to be used as subtype.

If you indicate that hwKind is a subtype property, this will allow the user to immediately choose a subtype when creating this element from the toolbox.

This is similar to what BPMN does with Activities.

Geert