Book a Demo

Author Topic: Show Stereotype Icon: how to get it with Shapescript?  (Read 6108 times)

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Show Stereotype Icon: how to get it with Shapescript?
« on: June 19, 2019, 03:47:13 am »
I'm trying to create a MDG technology that can react to the diagram property "Show  Stereotype Icon" like for the "Show Element Stereotype ".

Code: [Select]
if(hasproperty("stereotypehidden","false"))in the specs https://www.sparxsystems.fr/resources/user-guides/14.0/large-print/modeling/mdg-technologies.pdf I cannot find anything.
I know that I could create a tag
Code: [Select]
if(hastag("showdecoration","true"))
but the disadvantage is that you have to set each element separately.


Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #1 on: June 19, 2019, 05:04:28 am »
I think the property used here is "rectanglenotation"

For example in the shapescript for Archimate Application component

Code: [Select]
decoration component
{
orientation="ne";

if(hasproperty("rectanglenotation","0"))
{
}
else
{
moveto(10,10);
lineto(10,0);
lineto(90,0);
lineto(90,100);
lineto(10,100);
lineto(10,70);
moveto(10,50);
lineto(10,30);
startpath();
rectangle(0,10,40,30);
rectangle(0,50,40,70);
endpath();
strokepath();
}
}

Geert

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #2 on: June 19, 2019, 05:32:46 am »
thank you Geert, unfortunately this is the property to switch to the rectangle notation, if present will activate the third quick icon near the element.... 
Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #3 on: June 19, 2019, 04:07:19 pm »
thank you Geert, unfortunately this is the property to switch to the rectangle notation, if present will activate the third quick icon near the element....
Yes, I know, but I thought maybe it was double used.
Do you know any existing MDG that reacts to this setting? In that case we can simply look in the shapescripts for that technology

Geert

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #4 on: June 20, 2019, 01:51:23 am »
Quote
Do you know any existing MDG that reacts to this setting?

this is the thing: I think I remember -getting old- that previously UML (e.g. Application Component) was supporting that. Currently (version 14.1.1429) I cannot find anything that is reacting to this setting.
Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #5 on: June 20, 2019, 05:53:05 am »
I have a work around, use diagram stereotype. I use this in my MDG to show application components differently.
Happy to help
:)

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Re: Show Stereotype Icon: how to get it with Shapescript?
« Reply #6 on: June 20, 2019, 07:17:31 am »
I have a work around, use diagram stereotype. I use this in my MDG to show application components differently.

thank you, Sunshine. Do you know how to assign a diagram stereotype automatically with the diagram type in the MDG?
The idea is that the user would simply select the diagram and that would asssign als a stereotype.
BTW, in theory all the MDG diagrams are already stereotyped, because they come from UML standard ones.
« Last Edit: June 20, 2019, 11:11:23 pm by Giuseppe Platania »
Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python