Book a Demo

Author Topic: Set appearance of elements  (Read 3781 times)

SvenK

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Set appearance of elements
« on: March 11, 2013, 11:34:56 pm »
Hello,

according to http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/element2.htm , the appearance of an element can be set using SetAppearance (long Scope, long Item, long Value). However, it is not explained how Value should like. How can I set a color (R,G,B) with one integer?

In addition, I'm interested, how Scope=0 (Local) works. How does EA knows for what diagram the specified color should be used?

Thanks in advance
Sven

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Set appearance of elements
« Reply #1 on: March 12, 2013, 01:43:28 am »
Quote
void SetAppearance(long Scope,long Item,long Value)— Sets the visual appearance of the element. Scope must be set fixed to 1. The Value is applied to the Item
0 – Background color, 1 – Font Color, 2 – Border Color and 3 – Border Width.

Quote
Coloring values in EA have simple RGB values without transparency. Each red, blue and green value can take an intensity from 0 to 255. The RGB itself is calculated by
RGB = (blue * 256 + green) * 256 + red The default coloring is equal to -1.

From my book Scripting EA.

q.