Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ewo on February 15, 2023, 10:46:48 pm

Title: Toolbox icon based on attribute value
Post by: ewo 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!
Title: Re: Toolbox icon based on attribute value
Post by: qwerty on February 15, 2023, 11:08:10 pm
No. You probably can use an add-script to create dedicated elements.

q.
Title: Re: Toolbox icon based on attribute value
Post by: Geert Bellekens 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