Author Topic: Customize sequence message with automation  (Read 3366 times)

Hans

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
    • View Profile
Customize sequence message with automation
« on: August 28, 2006, 11:43:03 pm »
Hi,

I'm creating sequence diagrams with the EA automation interface. This works fine, however I like to change the width of the name of a message. I have discovered that EA reserves a width of 100px for this name by default . If the name is longer, you get several lines.

The consequences of several lines is that it overlaps the next message(s). If I export the model to XMI, I see that the 'UML:Message' has a tagged value 'privatedata5', which contains the width of the name ('CX=100'). If you change it, import the XMI, then the width of the label is changed.

I try to add this privatedata5 tagged value to the connector (= sequence message), however without any success. Does anyone knows if it is possible to change the width of this sequence message name.

Thanx

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Customize sequence message with automation
« Reply #1 on: August 28, 2006, 11:59:19 pm »
What the XMI calls 'privatedata5' is what the automation interface calls EA.Connector.MiscData(4) and it is readonly I'm afraid
The Sparx Team
[email protected]

Hans

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
    • View Profile
Re: Customize sequence message with automation
« Reply #2 on: August 29, 2006, 01:08:23 am »
Does this mean, that it is not possible to change these settings?

If so, then I have to look at if it is possible to update this column direct in the database.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Customize sequence message with automation
« Reply #3 on: August 29, 2006, 04:03:09 am »
Hans,

AFAIK at this time, yes it means you cannot update this field through the EA automation interface.

[This is true at this time, although I hope Sparx will, sometime soon, either add such a facility to the API or update the back end to make this a distinct field with its own API calls. Note that the latter solution will require a new back end schema and conversion program, but I think the product is getting to the point where this will be necessary for a variety of reasons.]

You definitely can update the field through a database call. Make absolutely sure you know what you are doing. Perhaps Sparx will share with you - and all of us - the current uses and formats for that field, just so none of us trash something while we're working.

Note that when you make modifications like this you are on your own if Sparx adds or modifies functions that make use of this field. Sparx has been careful to make such changes benign in the past, but you are still taking responsibilities for side effects now and in the future.

I have had success in these cases by opening a second channel to the database with OLEDB (alghough you should be able to use other DBMS APIs without too much trouble). I can then make the necessary changes, perhaps relaoding diagrams or the database afterwards so that my 'main' program using the EA API remains current. Note that a while ago Sparx tweaked the Professional and Corporate versions so that .EAP files are no longer opened exclusively. You can also have EA open these files via a connection string and treat them like any other DBMS repository - in this case make sure you open the files non-exclusively (have EA build you the connection string) or the other channel will fail.

HTH,
David
No, you can't have it!