Author Topic: How do I make element in custom profile default to a certain shape?  (Read 4419 times)

jankari

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Hello,
I have created a custom profile and I have a few components. The profile and the components work fine. What I want to happen is that I want each of the components to default to a certain shape assigned to them. For example, out of the box, I can take a component and change the stereotype to "queue" and it turns it into a circle; or I can take a component and change the stereotype to "cylinder" and it changes it to a cylinder. I want to use these features in the elements in my custom profile and use the same shapes that EA internally uses. So for example, an element in my custom profile should display as a circle by default using the same UML compliant shape that EA uses internally. I tried a few things but none of them worked.
Thank you in advance for your time and knowledge in responding.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How do I make element in custom profile default to a certain shape?
« Reply #1 on: January 18, 2017, 11:06:59 am »
That's pretty easy by assigning a shape script to the stereotype. There's a github repo where Geert Bellekens publish a lot (most) of Sparx's shape scripts (with their permission).

q.

jankari

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: How do I make element in custom profile default to a certain shape?
« Reply #2 on: January 20, 2017, 12:06:26 am »
Thanks qwerty.
« Last Edit: January 20, 2017, 12:11:39 am by jankari »

jankari

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: How do I make element in custom profile default to a certain shape?
« Reply #3 on: January 20, 2017, 04:46:00 am »
I looked through Geert Bellekens github repo. It has an extensive set of shapes! Its great! Thanks to "qwerty" for mentioning it. Does anyone know under which category the default shape for stereotype "queue" falls in? I looked through every folder in the above github repo but I couldn't find it. "Whiteboard" is the closest with similar shapes.
Thank you

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How do I make element in custom profile default to a certain shape?
« Reply #4 on: January 20, 2017, 09:51:48 am »
Which is this "queue" stereotype? It's no default, so I guess you got that from a profile?

q.

Nabil

  • EA User
  • **
  • Posts: 147
  • Karma: +5/-2
    • View Profile
    • View My LinkedIn Profile Here
Re: How do I make element in custom profile default to a certain shape?
« Reply #5 on: January 20, 2017, 05:24:44 pm »
Hello Jankari,

In my understanding you are trying to extend an UML element and you need a custom shape for your custom element right?

That can be done using shape scripts

http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/example_scripts.html

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/add_shape_scripts_to_uml_profi.html

Refer these links. Hope this will help.


BR
Nabil
Nabil