Author Topic: Assigning colors to stereotypes for both blocks and connectors? SYSML  (Read 1187 times)

Taylor

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Is it possible to assign a color to a stereotype either be it a block or a connector?

This way when a new block or connector is created, I can quickly select a predefined stereotype that then applies a specific color.

I've may struck out by navigating to the below areas within EA..

Layout>Appearance>Configure Status Color

Configure>UML Types

Thanks,

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11176
  • Karma: +410/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #1 on: January 29, 2021, 01:19:59 am »
Stereotypes are meant to distinguish different types of elements.

Using them as a shortcut to apply a color seems wrong. It's a bit like asking if you can use a power drill to stir your coffee.

It can be done by assigning a color in the shapescript, but I wouldn't recommend it.

Have you looked at diagram legends? They can be used to color the elements on a diagram based on a number of different characteristics.

Geert

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1091
  • Karma: +101/-9
  • Its the results that count
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #2 on: January 29, 2021, 02:48:22 am »
I concur with Geerts suggestion of using diagram legend for achieving your objective
Happy to help
:)

Martin_Bohring

  • EA Novice
  • *
  • Posts: 12
  • Karma: +5/-2
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #3 on: January 30, 2021, 05:02:56 am »
Yes a diagram legend is one way to go (and a good one at that).
Using stereotypes to color elements is something supported also by legends. So there is a use case for that  ;)
I believe it is all about the mind set at play why and when you do it:

Create a Stereotype to color elements? Hell no that feels wrong on so many levels.
(it is meant for element meta types, part of the type and not a diagram/ display concern, yada, yada, ...)

But, if you already have a Stereotype for typing reasons (e.g. this connector is <<electrical>> or this block is <<mechanical>>), then it really can make sense to color elements and connections based on the applied stereotype.

Taylor

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #4 on: February 06, 2021, 03:46:01 am »
@Martin_Bohring

Your last point is spot on, I will update thread if I find solution, thanks.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1091
  • Karma: +101/-9
  • Its the results that count
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #5 on: February 06, 2021, 08:45:28 am »
Another thought, if you have javascript or vbscript skills you can write a script to scan elements on the diagram and change the colours. You can put the script in a diagram script folder so you can right click on diagram and invoke the script that way or do a JavaScript plug-in and invoke it from the ribbon.
Happy to help
:)

timoc

  • EA User
  • **
  • Posts: 153
  • Karma: +10/-0
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #6 on: February 18, 2021, 09:20:00 pm »
If i remember correctly, there is a free plugin that might fit the bill. It has its own diagram styling capability.

https://www.sparxsystems.com/forums/smf/index.php/topic,44949.msg264523.html#msg264523


Takeshi K

  • EA User
  • **
  • Posts: 389
  • Karma: +15/-1
    • View Profile
Re: Assigning colors to stereotypes for both blocks and connectors? SYSML
« Reply #7 on: February 19, 2021, 11:58:10 am »
Maybe the add-in is following:
https://www.sparxsystems.com/forums/smf/index.php/topic,45041.0.html

The Add-in mentioned by timoc does not change colour of elements/connectors.
--
t-kouno