Book a Demo

Author Topic: MDG tech file: element color syntax  (Read 3597 times)

spg

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
MDG tech file: element color syntax
« 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!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG tech file: element color syntax
« Reply #1 on: September 16, 2009, 09:29:53 pm »
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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG tech file: element color syntax
« Reply #2 on: September 16, 2009, 09:33:46 pm »
In the help file I found this (in the "Enterprise Architect Object Model - DiagramObjects")
There's a good chance profiles work the same way:
Quote
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

spg

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: MDG tech file: element color syntax
« Reply #3 on: September 16, 2009, 10:39:35 pm »
Yay, it worked!

e.g. blue FF0000 (HEX) -> 16711680 (DEC) as color code results in the correct color!


Thanks a lot!