Book a Demo

Author Topic: Accessing style through automation  (Read 3985 times)

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Accessing style through automation
« on: June 24, 2003, 02:37:43 pm »
I am trying to access various parts of the application through Automation - using both VB6 and VB.NET (as the mood takes me)

What I need to do is set up some of the classes on my diagram so that the style is configured differently according  to certain rules coming from another location.  (I know that UML advises against relying on colour - but the whole point of the reverse engineering I have done is to quickly show a client how badly affected their current system is - 1 diagram, lots of colour - clearly shows what I am trying to achieve)

Now, a diagramobject exposes a style property but I can't get it to do anything - either reading it or writing to it.

The only way I have been able to change the display colour is by deriving the ElementID from the diagram and then issuing a SQL update statement to the t_object table for that elementID in the t_object table to set the background colour to what I need.

My question, after the very long explanation is does this automation property work correctly?  Is there an automation property that I have missed that lets me set the background colour correctly?  What is .styleex on element?

In addition, sometime ago there was a question about multiple styles for objects depending on which diagram the object was on - has there been any more work done on this?

Many thanks,

Matt
« Last Edit: June 24, 2003, 02:39:33 pm by Matt_Ellis »

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: Accessing style through automation
« Reply #1 on: June 29, 2003, 06:45:08 pm »
Hi Matt,

Currently you can't use the automation interface to set the background colour for elements.

Regarding setting multiple styles for elements on different diagrams, this option has just been added to the interface.  So you will be able to change the default colour an element or its color in just one diagram.  This will be accessed via a new Element menu off the main menu.  For the Automation Interface there will be an API which looks something like: SetAppearance(scope, item, value), where scope being 0 or 1 indicates either "global" or "local" change.  This addition to the automation interface should be included in the next major version of EA.

Regards,
Ben

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Re: Accessing style through automation
« Reply #2 on: July 01, 2003, 02:00:13 am »
Sounds good!

Looking forward to it!