Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: jankari on January 18, 2017, 06:59:27 am
-
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.
-
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.
-
Thanks qwerty.
-
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
-
Which is this "queue" stereotype? It's no default, so I guess you got that from a profile?
q.
-
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