Book a Demo

Author Topic: Change DiagramObject Background Color in Script  (Read 4204 times)

Drops

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Change DiagramObject Background Color in Script
« on: August 14, 2012, 07:14:58 pm »
How do I set the background color of a diagram object without changing other style attributes?




qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Change DiagramObject Background Color in Scrip
« Reply #1 on: August 14, 2012, 10:40:42 pm »
From my Scripting book
Quote
The Style property contains a semi-colon separated list used for setting the appearance of a DiagramObject. It is set with a string value in the format:
     BCol=<c>;BFol=<c>;LCol=<c>;LWth=<n>;
where
BCol = Background Color BFol = Font Color
LCol = Line Color
LWth = Line Width
<n> is a width and <c> is a RGB value.

So I'd suggest to write only one of the attributes to see if it replaces all (I guess not). But if you need to SQL query the according element, parse it and pass the new attribute list.

q.
« Last Edit: August 14, 2012, 10:46:37 pm by qwerty »