Book a Demo

Author Topic: Define text colors depending on the element type  (Read 5116 times)

Eiberle

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Define text colors depending on the element type
« on: January 23, 2013, 02:53:44 am »
Hi,

I am wondering if there is a way in EA 10 to define the text color for all classes to white and the text color for all interfaces to black.

Background
The element filling is dark blue and the text written in the class is better readable if it is white, whereas the interface will be shown as lollypop with the text outside the element and there the background is white

I only found the way to define the color global using the 'Settings->Standard Colors' thing, but this sets the color of all elements (classes, interfaces,...). The other way to define the default appearance has the drawback that this must be done on every type.

Defining specific stereotypes only for the color settings seems for me also to be the wrong way.

Has anybody also this requirement or even better a hint how to get this solved.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Define text colors depending on the element ty
« Reply #1 on: January 23, 2013, 03:45:42 am »
The only way would be to use shape script and then setfontcolor.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Define text colors depending on the element ty
« Reply #2 on: January 23, 2013, 08:55:55 am »
You can use a template package to set the default colour scheme for all new elements of a given type. This won't change the colour of any pre-existing elements though, so those will have to be changed manually...
The Sparx Team
[email protected]

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Define text colors depending on the element ty
« Reply #3 on: January 23, 2013, 09:35:36 am »
Yes I use this technique, however in EA Version 10 release build 1005 it does not appear to work for Issues and Changes, however it does work fro Requirements.

Is this intentional or a bug?
Models are great!
Correct models are even greater!

Eiberle

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Define text colors depending on the element ty
« Reply #4 on: January 23, 2013, 05:25:22 pm »
I have just tried to use the template package and it seems to work. But with the template package I encountered two new issues:

  • Is there a way to define a shadow in the template package?  I have to use different fill colors (mainly blue and white) and so the shadow should of the element must be set also to some kind of light blue or white.
  • The template package will affect only new elements. Is there a way to "update" already existing elements?


RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Define text colors depending on the element ty
« Reply #5 on: January 24, 2013, 09:28:45 am »
In answer to your first point, normally the shadow color for elements is a standard color across all element types, set on the Tools | Options > Standard Colors page. You cannot set element shadow colors purely for specific element types.

You can, however, assign a status to an element (and define your own status types) and set a color to represent that status on a diagram. Then, in your template diagram define element type X to always be created with default status Y. For Requirement-type elements the color is displayed as a band at one end of the element, but for other element types (which you identify on the Status Types dialog) the color is shown in the element shadow.

This is not hard to set up, but it is a bit fiddly in turning various options on for both your template diagram and the 'work' diagram you are creating. Start by reading Modeling Basics > Reference Data > General Types > Status Types in the Help and work out from there. If you get lost, ask again.
« Last Edit: January 24, 2013, 09:51:20 am by RoyC »
Best Regards, Roy

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Define text colors depending on the element ty
« Reply #6 on: January 24, 2013, 09:35:03 am »
Quote
Yes I use this technique, however in EA Version 10 release build 1005 it does not appear to work for Issues and Changes, however it does work fro Requirements.

Is this intentional or a bug?
Works for me, no idea why it might be going wrong for you. Maybe drop a line to Sparx support.
The Sparx Team
[email protected]

Eiberle

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Define text colors depending on the element ty
« Reply #7 on: March 18, 2013, 07:04:14 pm »
Hi,

I just discovered that using the template package seems not to work in reverse engineering scenarios. I have defined the template for a class and if I add new class from the toolbox, the class has the specified appearance. But if I import a VisualStudio project (using MDG Integration for Visual Studio and EA Build 1004), the class will not use the template definitions.

Does anybody know a workaround to this problem?