Book a Demo

Author Topic: Reading line color of class with C# API  (Read 2867 times)

Nikola Obrenovic

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reading line color of class with C# API
« on: April 24, 2010, 06:13:58 pm »
Hi all,

I am using Automation C# API to read a class diagram from an .eap file and I need to read the line color of graphical symbol of a class. So far, I have found DiagramObject.Style property, but it is write-only and I have tried to query from t_diagramobjects but the ObjectStyle column did not have LCol value for the colored classes.
Is there any other way to read the line color of a class?

Thank you,
Nikola

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Reading line color of class with C# API
« Reply #1 on: April 26, 2010, 03:50:13 pm »
Quote
DiagramObject.Style property, but it is write-only
WTF :o
That is the first time EVER I've seen a write-only property.
Is that new in 8.0?

Anyways, if the t_diagramobjects.objectStyle doesn't have the property try looking at the style properties of the element itself. I think the style property of the diagram object is only filled in when it is different from the default.

Geert


Nikola Obrenovic

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Reading line color of class with C# API
« Reply #2 on: April 26, 2010, 05:36:02 pm »
Hi Geert,

Query "select Bordercolor from t_object where Object_ID=123" has done the job. Thank you very much for the help!


Regards,
Nikola