Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Drops on August 14, 2012, 07:14:58 pm

Title: Change DiagramObject Background Color in Script
Post by: Drops on August 14, 2012, 07:14:58 pm
How do I set the background color of a diagram object without changing other style attributes?



Title: Re: Change DiagramObject Background Color in Scrip
Post by: qwerty 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.