Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: spg on September 16, 2009, 09:16:24 pm
-
Hello everybody!
In a project using stereotyped UML elements. In the mdg technologies file we pass around to provide the stereotypes needed, one entry looks like this:
<Stereotype name="myStereotype" metatype="myType" notes="" cx="160" cy="70" bgcolor="-1" fontcolor="-1"
[...]
My question:
What is the format used to change the default background color of an element?
I tried different formats for bgcolor:
- using HEX color codes (e.g.: #E47833 ) does not work, same without the #
- decimal values from 1 to 255 result in variations of red
- leading zeros are not accepted: 000255 is still red
- 10255 results in dark green, 11255 results in red [smiley=huh.gif]
- etc., a lot of pain trying the codes
Doe anyone know the format scheme for this entry and would like to share his wisdom? :)
Thanks a lot!
Cheers!
-
Can't you figure it it if you create a profile in EA, set the default appearence, and then export it as a profile?
Geert
-
In the help file I found this (in the "Enterprise Architect Object Model - DiagramObjects")
There's a good chance profiles work the same way:
The color value is a decimal representation of the hex RGB value, where Red=FF, Green=FF00 and Blue=FF0000. For example:
DiagObj.Style = "BCol=35723;BFol=9342520;LCol=9342520;LWth=1;"
Geert
-
Yay, it worked!
e.g. blue FF0000 (HEX) -> 16711680 (DEC) as color code results in the correct color!
Thanks a lot!