Book a Demo

Author Topic: set the order of connectors in a sequence diagram  (Read 5883 times)

sig550

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
set the order of connectors in a sequence diagram
« on: February 16, 2017, 01:03:47 am »
Hey,

I'm trying to create an addin in VS C# which automatically creates a sequence diagram. I can add elements and I can add connectors from element a to element b, but the order of the connectors goes wrong. Example:

I set the relations as followed:
1) A ---> B
2)            B ---> C
3) A ----------> C

But 2) and 3) swapped to the following result:
1) A ---> B
3) A ----------> C
2)            B ---> C

It looks like he prints all connectors from element a first, then all from element b and so on. Is there a way to set the order of the connectors like added?
« Last Edit: February 16, 2017, 01:15:20 am by sig550 »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: set the order of connectors in a sequence diagram
« Reply #1 on: February 16, 2017, 02:46:28 am »
It seems like this is controlled by Connector.EndPointY. I have not tried that, but this corresponds to the order in the diagram. There's also Connector.StateFlags which seem to play a role.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: set the order of connectors in a sequence diagram
« Reply #2 on: February 16, 2017, 03:22:47 am »
For sequence diagram messages you have to set the Sequence Number (t_connector.SeqNo in the database)

Geert

sig550

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: set the order of connectors in a sequence diagram
« Reply #3 on: February 16, 2017, 03:48:52 am »
Could you give me a short example how to work with the database in EA? There should be something to get access to the DB. Like a connector or a database object.

sig550

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: set the order of connectors in a sequence diagram
« Reply #4 on: February 16, 2017, 06:46:55 am »
Use the SQL Search scratch pad for only queries. Repository.SQLQuery(query) returns a XML result set. And (shameless plug) look into my Inside book.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: set the order of connectors in a sequence diagram
« Reply #5 on: February 16, 2017, 06:22:21 pm »
You don't need to access the database for this one. You can use EA.Connector.SequenceNo

Geert

sig550

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: set the order of connectors in a sequence diagram
« Reply #6 on: February 16, 2017, 07:50:38 pm »
Thank you very much, works perfect.