Book a Demo

Author Topic: Custom stereotype colors not in Profile XML  (Read 10490 times)

Rik van der Schalie

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Custom stereotype colors not in Profile XML
« on: June 17, 2024, 11:23:30 pm »
I'm creating a set of my own Stereotypes. While I have given them a default background color, when I export the stereotype diagram to a profile XML, the background color does not export, but remains at -1 in the XML. So I have to use a shape script to give my objects a background color. That, however, prevents me from changing the background color of individual objects, as the fill color in the shape script apparently overrides the background color you can apply in a diagram.
Does anyone recognize this and is able to set me on the right path?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom stereotype colors not in Profile XML
« Reply #1 on: June 18, 2024, 12:14:43 am »
Hi Rik,

I'm not sure if there's more too it than explained on Stackoverflow https://stackoverflow.com/questions/78579696/custom-stereotypes-do-not-inherit-appearance-from-superclass-stereotypes

If you follow these steps (making sure you actually set the Default color, and not the local diagram appearance) it should work when exported from a package.
I've done it like that dozens of times.

Maybe someone else has had the same issue and can give you a useful hint.

Geert

Rik van der Schalie

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Custom stereotype colors not in Profile XML
« Reply #2 on: June 18, 2024, 12:52:41 am »
I've tried again, making sure to set the default color of my stereotype using F4.
I then publish the diagram as UML Profile.  Still, in the exported profile, the background color stays at -1.
When I publish the Package as UML Profile, the background color is OK, but then the shpe scripts no longer work.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom stereotype colors not in Profile XML
« Reply #3 on: June 18, 2024, 03:19:47 am »
When I publish the Package as UML Profile, the background color is OK, but then the shpe scripts no longer work.
I think you should focus on why the shapescript don't work when publishing from package.

Do you see the shapescript in the resulting xml?

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom stereotype colors not in Profile XML
« Reply #4 on: June 19, 2024, 07:46:35 pm »
Dealing with profiles is tricky since Sparx left a lot of trap doors. On is that saving profiles often goes the wrong way. Another is that a the wrong profile is effective since you have Ressources and the Advanced option and you don't see which is effective. Best is to test with an absolutely fresh eap (and a fresh mind) and see what comes out.

q.