Book a Demo

Author Topic: Problems with “Use Stereotype Icons”.  (Read 11543 times)

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Problems with “Use Stereotype Icons”.
« on: April 21, 2016, 11:18:02 pm »
I have defined a stereotype with an icon attribute set.

The icon is shown in the project browser when the element has as primary stereotype my “icon stereotype”.

But the icon is not visible on the element in the diagram as shown here:
http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/stereotype_visibility.html

Any idea?

Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #1 on: April 22, 2016, 06:07:48 am »
Those might be created with a shape script (additionally).

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #2 on: April 22, 2016, 05:23:37 pm »
Shape scripts I already did, but there I have a problem when applying more than one stereotype to one item.
My items are typically SysML blocks already having <<bock>> as stereotype. My problem there is that I do not understand the rule (if any) what fires when in case of many stereotypes assigned to an element.
Best regards,

Peter Heintz

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #3 on: April 22, 2016, 05:46:15 pm »
Shape scripts I already did, but there I have a problem when applying more than one stereotype to one item.
My items are typically SysML blocks already having <<bock>> as stereotype. My problem there is that I do not understand the rule (if any) what fires when in case of many stereotypes assigned to an element.
The problem, Peter, is that "Icons ain't icons". Search "Oils ain't Oils" in your search engine.

A smallish number of the widgets you see in the top right of the vertices are Sparx hard coded icons.  You can't modify or change them in any way.

The rest (such as with ArchiMate MDG) are decorations.  The icon specified in the MDG is NOT for displaying on a diagram, but the toolbox and browser.  You have to code the "icons" you want on the shapes with shapescript commands.

As you've concluded, there is no way you can get at other then the principal stereotype from a shapescript - other than using an Add-In function call.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #4 on: April 22, 2016, 05:55:32 pm »
I remember having had this issue in the past and decided to avoid multiple stereotypes. Rather, I created new stereotypes being the right mix. That worked out since there were only few cases of such mixes. I can see that where people need a real mix they are lost and have to fall back to tricky add-in solutions.

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #5 on: April 22, 2016, 06:58:26 pm »
Thank you both!
So I can avoid trying things that will not work! :)

What I want to achieve is the following:
I have a model library containing any kind of elements and I want to make it visual more clear that those elements belong to the model library when used in a diagram (currently I just add a <<asset>> stereotype to those lib elements).

With colors I get it done, but I do not like that very much because others use some other kind of magic color schema with some other more or less defined meaning. (I do not like those color magic stuff at all).
Do you have any other idea to achieve my goal (apart of tricky add-in solution)?
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problems with “Use Stereotype Icons”.
« Reply #6 on: April 22, 2016, 07:25:22 pm »
Multiple stereotypes is always tricky. I try to avoid those as well.

Maybe you could use the Bookmark (shift + space) for this. (then at least it one organisation would use it  ;))
That seems to work on any element, regardless of the shapescript or stereotype.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #7 on: April 22, 2016, 09:27:17 pm »
You might think of tagged values for those things.

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #8 on: April 22, 2016, 09:50:31 pm »
What do you have in mind regarding visualization, just “show tagged values" or something else?
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #9 on: April 22, 2016, 09:53:35 pm »
No. Use tagged values to control the visualization. This way you can combine whatever tags you like and the shape script can cope with that (more or less elegantly).

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #10 on: April 22, 2016, 09:55:43 pm »
Ok, I will try this!
Thank you.
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #11 on: April 22, 2016, 10:40:12 pm »
You should also think about tagged value groups. For me that was a perfect substitute. When designing the MDG you can think of possible combinations and create TV groups that are relevant to what you wanted to do with single stereotypes. This results in a more strict model than with using multiple stereotypes.

q.

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #12 on: April 25, 2016, 10:36:46 pm »
I stuck with the implementation.

With the tagged values I can avoid creating a bunch of stereotypes, what is nice. But to activate that script I do need at least one “primary” stereotype, isn’t it.
Or is there somewhere a way to call sharp scripts just by tagged values rather than by stereotypes.
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problems with “Use Stereotype Icons”.
« Reply #13 on: April 25, 2016, 10:38:02 pm »
Or is there somewhere a way to call sharp scripts just by tagged values rather than by stereotypes.

No, I don't think so.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems with “Use Stereotype Icons”.
« Reply #14 on: April 26, 2016, 06:50:27 am »
Geert is right. Triggering a shape script is done via a stereotype. At first I saw that as limiting too, but over time I got used to it and now think, that it is a fine this way.

q.