Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: MatthiasVDE on April 06, 2016, 07:02:40 pm

Title: Change use case color
Post by: MatthiasVDE on April 06, 2016, 07:02:40 pm
I created some use cases and now I want t change the colors of them in function of a progress state:
Busy -> orange
Done -> green

I tried with stereotypes and shape scripts, but I can't just change the color with that, only draw a completely new shape.
Title: Re: Change use case color
Post by: qwerty on April 06, 2016, 08:17:45 pm
Well, there's SetFillColor(red,green,blue) in shape script.

q.
Title: Re: Change use case color
Post by: Geert Bellekens on April 06, 2016, 08:43:23 pm
Well, there's SetFillColor(red,green,blue) in shape script.

q.

Yes, and IIRC you can combine that with drawnativeshape() to get the same shape but only a different color.

Geert
Title: Re: Change use case color
Post by: MatthiasVDE on April 06, 2016, 09:03:07 pm
So the only option is to draw and fill a new shape? I can't just colorize the existing use case?
Title: Re: Change use case color
Post by: Geert Bellekens on April 06, 2016, 09:28:03 pm
If you use DrawNativeShape() you are actually drawing the standard use case shape.
How is this different from what you expect?

Geert
Title: Re: Change use case color
Post by: RudiCz on April 07, 2016, 12:29:55 am
Hey,
I would add a Legend to the diagram and use the 'Apply Auto color' option. Than you can define the status as 'Value' and the usecase will appear automatically in the desired Color.
Tschüs
Rudi
Title: Re: Change use case color
Post by: Geert Bellekens on April 07, 2016, 12:56:26 am
Hey,
I would add a Legend to the diagram and use the 'Apply Auto color' option. Than you can define the status as 'Value' and the usecase will appear automatically in the desired Color.
Tschüs
Rudi
Yes, true, that could work too. This feature was added in v 12.1 I think.

Geert
Title: Re: Change use case color
Post by: ChB on April 07, 2016, 01:01:10 am
MatthiasVDE

If you want to color your Use Case (or other) elements according to some "status" then Rudi's suggestion of a Legend could be what you need.

And you can change/add to the list of built-in status using:
That will let you add status of Busy and Done and choose what color you want for them.

See here in the User Guide: http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/statustypes.html (http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/statustypes.html)  Note the bit about "Applies To" Use Cases.

And for Legends: http://sparxsystems.com/cgi-bin/search/search.pl?Terms=Legend&Realm=12.1+help (http://sparxsystems.com/cgi-bin/search/search.pl?Terms=Legend&Realm=12.1+help)

Note that I'm using EA 12.1, I think some menus have changed from version to version.
Title: Re: Change use case color
Post by: MatthiasVDE on April 16, 2016, 01:57:55 am
That works, thank you.