Book a Demo

Author Topic: Custom Shape Script for "SysML 1.5::requirement" Stereotype  (Read 6458 times)

Corey

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Custom Shape Script for "SysML 1.5::requirement" Stereotype
« on: November 04, 2021, 01:46:13 am »
Quick background: We're building SysML 1.5 requirement diagrams and, in some cases, show the "id" and "text" tags on the diagram elements. We can't just turn on the tags compartment, because we also have custom tags set for various reasons, and we don't want those shown. It seems our best option would be to create a custom shape script for the requirements elements that adds a custom compartment only showing the "id" and "text" tags.

Where I'm stuck is that I cannot seem to control the appearance for the "SysML 1.5::requirement" stereotype. Editing the "requirement" stereotype in the UML Types list has no effect, and creating another item under UML Types with stereotype "SysML 1.5::requirement" doesn't work either.

In fact, it seems like EA doesn't associate the SysML 1.5::requirement stereotype with any UML Type data. Normally when opening the UML Types window with an element selected, it will automatically go to the stereotype for the selected element. This doesn't happen with any SysML elements.

So my question is: How do I apply a custom shape script to SysML requirement elements? Or is there a better way to display only the "id" and "text" tags on a requirement per the SysML 1.5 specification?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Custom Shape Script for "SysML 1.5::requirement" Stereotype
« Reply #1 on: November 04, 2021, 08:32:39 am »
You can't add a shape script to stereotype from a profile you don't control.

The good news is, since you're adding your own tagged values to it, the "correct" way to do it is to define your own profile with a stereotype extending SysML Requirement. You can add a shape script to that stereotype.

https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/non-uml_metatypes.html

PS. When adding the metaclass for the SysML 1.5::requirement you will need to look for the profile "SysML1.4". The added space and the version number difference are an alias on top of the original profile name.