Book a Demo

Author Topic: Resetting element appearance to default after switching from UML to ArchiMate  (Read 94317 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
We are in the process of trialling what will become a new ArchiMate base MDG. Part of trial as mentioned elsewhere in the forum involves cloning the UML baseline, creating new versions of elements and changing their types to an out-of-the-box ArchiMate type. The process works well within reason but there is one annoying glitch: the appearance of the elements does not change, we have not yet found a way to reset the appearance to the default ArchiMate settings.

Have we missed something?

P.S.: We are still on version 16.X (64 -bit)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
If you are running a script on a diagram as indicated in a previous post then you'll need to add a couple of lines to save and reload diagram.
Code: [Select]
Repository.SaveDiagram(diagram.DiagramID);
Repository.ReloadDiagram(diagram.DiagramID);
 
« Last Edit: September 17, 2025, 10:34:55 am by Sunshine »
Happy to help
:)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
We were initially running this from the UI, including, at some point, closing and reloading the diagram. Have also tried the scripts, including a save and refresh of the current diagram, the result is the same, the colour fill of the changed elements does not automatically change.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
We were initially running this from the UI, including, at some point, closing and reloading the diagram. Have also tried the scripts, including a save and refresh of the current diagram, the result is the same, the colour fill of the changed elements does not automatically change.
The color fill is the default color. That only gets assigned at creation. The user can change that later on.

So changing the stereotype won't change the default background color. You'll have to do that yourself.

Geert

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
We were initially running this from the UI, including, at some point, closing and reloading the diagram. Have also tried the scripts, including a save and refresh of the current diagram, the result is the same, the colour fill of the changed elements does not automatically change.
The color fill is the default color. That only gets assigned at creation. The user can change that later on.

So changing the stereotype won't change the default background color. You'll have to do that yourself.

Geert
You can do that via script too.
« Last Edit: September 19, 2025, 07:53:11 am by Sunshine »
Happy to help
:)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
You can do that via script too
Yes indeed, sorry if that wasn't clear. By "yourself", I meant you have to write code to change the default background color.

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Sorry if I have not articulated the question unambiguously.

Out of the box any ArchiMate elements in the application layer are rendered by Sparx EA with a blue/blueish fill. Somehow I was expecting that after manually converting,  without using a script, an existing element to ArchiMate application element, the right fill will be applied after saving and reloading a diagram, or after saving, closing, and reopening the diagram.

The fill never changes.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
So if I understand you correctly, you are expecting the UML elements that have been converted via script to ArchiMate to have that light blue fill however, you are finding that not to be the case. I can hypothesis that the default colours assigned to the stereotypes in ArchiMate are applied at the time of creation of the element. Thus by changing the stereotype the element is not being created but transformed so the fill colour is not being applied to the element. The way to fix that will be that you'll need to add to the transformation script the set fill colour so its applied to the element.
Happy to help
:)