0

enter image description here

Consider a below Image that is drawn in sparx systems enterprise architect tool is there any way to get the colour of each element like: blue, yellow. I know I cant get from tagged value because I have not mentioned.

1 Answer 1

2

Check EA.DiagramObject.Style

From the help file:

The Style attribute is used for setting the appearance of a DiagramObject; it is set with a string value in the format:

BCol=n;BFol=n;LCol=n;LWth=n;

where:

· BCol = Background Color

· BFol = Font Color

· LCol = Line Color

· LWth = Line Width

The color value is a decimal representation of the hex RGB value, where Red=FF, Green=FF00 and Blue=FF0000

DiagObj.Style = "BCol=35723;BFol=9342520;LCol=9342520;LWth=1;"

The following code snippet shows how you might change the style settings for all of the objects in the current diagram, in this case changing everything to red:

     For Each aDiagObj In aDiag.DiagramObjects

       aDiagObj.Style = "BCol=255;BFol=9342520;LCol=9342520;LWth=1;"

       aDiagObj.Update

       aRepos.ReloadDiagram aDiagObj.DiagramID

     Next
4
  • The answer was very use full for me. Is it possible to get only "BCol". and my answer is something like this DUID=7B76C627;NSL=0;font=Arial;bold=0;italic=0;ul=0;charset=0;pitch=34;fontsz=80;BCol=16764057;
    – Rickey
    Feb 17, 2015 at 15:55
  • and how do you know which colours are those numbers?
    – Rickey
    Feb 17, 2015 at 16:19
  • But I am not able to understand the colour code actually . If BCol=16764057 could you tell me which colour is this? and how?
    – Rickey
    Feb 18, 2015 at 8:42
  • I think you saw the above diagram the Bcol for request one should Blue but its showing me the output as Pink-beige.
    – Rickey
    Feb 18, 2015 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.