Author Topic: Auto route connectors/Layout diagram  (Read 6156 times)

Aleksandar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Auto route connectors/Layout diagram
« on: September 30, 2013, 11:45:08 pm »
Hi,


After adding elements to a diagram through the automation interface (which are connected with nesting connectors), by using

project.LayoutDiagram(diagramEA.GetDiagramGUID(), n)

 I can layout the diagram in hierarchical order. The value for n doesn't seem to influence the layout.

However I cannot find a way to call the auto route for the connectors through the automation interface. Is that possible?

And one more question... I know that there is a problem with the port positioning (which doesn't work), so I'm using sql updates for that, but is it somehow possible to call auto route for the connectors connected to ports?

Thanks,

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #1 on: October 01, 2013, 02:31:17 am »
Quote
However I cannot find a way to call the auto route for the connectors through the automation interface. Is that possible?
I don't understand what you want :-? Do you want to set auto-route for single/all connectors? That's a property in t_connectors. Do you have my Inside book?


Quote
And one more question... I know that there is a problem with the port positioning (which doesn't work), so I'm using sql updates for that, but is it somehow possible to call auto route for the connectors connected to ports?
No. EA does not layout port connectors. I once wrote a Perl script to assist with that which I had publish on the community site. It has a bit of fuzzy logic which aligns opposing ports and so on.

q.
« Last Edit: October 01, 2013, 02:32:55 am by qwerty »

Aleksandar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #2 on: October 01, 2013, 05:48:53 am »
Yes, I have the book. I want to call auto route on all connectors. I'm first adding all the elements to the diagram, and then i call

project.LayoutDiagram(diagramEA.GetDiagramGUID(), n)

from the projectInterface so they are displayed in hierarchical order similar to the Diagraph option for layout, so after that because some connectors are displayed over other elements, I'm trying to call the Auto route (which is one of the options for layout of a diagram...like Circle, Diagraph or Box...)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #3 on: October 01, 2013, 09:10:39 am »
Ah. I have not published that version yet. You need to set the CSV tag MODE=3; in t_diagramlinks.geometry. That will let EA render auto-route. I'll publish the new chapter 2.5 about t_diagramlinks the next days.

q.

rothnic

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #4 on: October 01, 2013, 11:03:54 am »
Quote
Yes, I have the book. I want to call auto route on all connectors. I'm first adding all the elements to the diagram, and then i call

project.LayoutDiagram(diagramEA.GetDiagramGUID(), n)

from the projectInterface so they are displayed in hierarchical order similar to the Diagraph option for layout, so after that because some connectors are displayed over other elements, I'm trying to call the Auto route (which is one of the options for layout of a diagram...like Circle, Diagraph or Box...)

I wrote a script to allow converting all connectors on a diagram to each style. You just have to switch out the setting at the beginning to set it up for how you want to use it. You can make multiple copies of it to switch between the multiple styles. http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1377757601

The way you change between them isn't very straight forward.
« Last Edit: October 01, 2013, 11:05:42 am by rothnic »

Aleksandar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #5 on: October 14, 2013, 05:06:53 pm »
Thanks for the advice qwerty and rothnic. By setting the CSV MODE =2 for the style for each individual connector, I can set them to auto-route style. However the lines still cross other elements.

What I was looking for was a way to call this what is displayed in the link, but from the automation interface.. so i'ts just clicking a button to layout the diagram...

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/layout_diagrams.html

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/auto_route_layout.html

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Auto route connectors/Layout diagram
« Reply #6 on: October 14, 2013, 08:38:02 pm »
Check LayoutDiagramEx which provides more options (like the layout style which includes auto-route). I have not tested it, but according to the help it should work.

q.