Book a Demo

Author Topic: Import, then Diagram->Layout, routes messed up  (Read 13924 times)

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Import, then Diagram->Layout, routes messed up
« on: February 08, 2015, 04:03:20 am »
I do a LOT of reverse engineering with Enterprise Architect; in fact it's the vast majority of the work that I do with EA.

When I import a directory tree full of .h files into EA, I get classes all stacked in a diagonal line from top left to lower right.  So, I select Diagram->Layout Diagram, and the result is usually something I can work with, to manually lay out the class diagram tree the way I want it.

Except... all of the routes between classes have breaks and corners and elbows and if I try to move a class, the routes follow only to the first elbow.  This is not useable.

I've been looking since version 4.<something> for a workable way to either globally change all connectors to Direct, or specify Direct when importing, and have not found one.  I haven't had occasion to use EA since version 7.5 but now I'm getting re-familiar with version 11.1 and if this feature is there, I can not find it.

Thanks...

Eric in NH/USA
[email protected]
www.rkt-tech.com

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #1 on: February 08, 2015, 04:24:47 am »
Try Tools/Options/Links/Default Style

q.

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #2 on: February 08, 2015, 04:44:09 am »
Quote
Try Tools/Options/Links/Default Style

And, there it is.  Thanks, q.

Now, for diagrams that have already been imported (and modified), how do I go about globally changing all of the links to Direct?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #3 on: February 08, 2015, 04:50:10 am »
Well, either by hand  :-X, using a SQL or via API. What would you prefer?

q.

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #4 on: February 08, 2015, 05:13:19 am »
Quote
Well, either by hand  :-X, using a SQL or via API. What would you prefer?

Wow, those are still the only ways after all these years (10 years) of this being a known problem?

There are many hundreds to a few thousand connections so "by hand" isn't going to work.  Back in 2005 they told me I could hand-edit the EA database using Microsoft Access, which I tried but even today it appears the database is still Access 97 or earlier, and newer versions of Access, even Access 2000, want to "upgrade" the database before allowing modification, after which of course EA will no longer be able to read it.

Maybe I'll try LibreOffice's database manager.  I should be able to make A Fine Mess out of (a copy of) the database with that  :-/.  Hopefully it's still the t_diagramlinks field, change Mode=3 to Mode=1.  Kind of hate to do that though since I'll have no way of knowing up front what else I might damage by doing that.

Eric

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #5 on: February 08, 2015, 06:12:57 am »
You will (most likely) damage nothing if the SQL is correct (which is not always the case). So make a backup and look at the results. If the connectors have changed it should be ok.

q.

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #6 on: February 08, 2015, 11:26:32 am »
Quote
Try Tools/Options/Links/Default Style

Well, that didn't work.  I tried creating a whole new project, set Tools->Options->Links->Default to Direct, and imported the source files... lots and lots of the links still show up as bent with many elbows and bends.   :(   :(   :(

It seems Access 2010 will let me sort of edit Access 97 databases... guess I have no choice but to try that.  It's inconceivable that this problem, known for more than 10 years, hasn't been fixed... there has to be a better fix than this.  I've sent a note to customer support; hopefully they'll have a solution that wasn't obvious.

Eric

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #7 on: February 08, 2015, 08:59:38 pm »
An import will not respect that setting. It's only for newly created connectors.

q.

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #8 on: February 09, 2015, 12:16:42 am »
Quote
An import will not respect that setting. It's only for newly created connectors.

So I see.  So, back at square 1.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import, then Diagram->Layout, routes messed up
« Reply #9 on: February 09, 2015, 06:27:29 pm »
Eric,

I use a generic SQL client to connect to a .eap file and execute queries (because I don't like MS-Access)
There a may clients like that. The one I'm using is AnySQL Maestro

Geert

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #10 on: February 09, 2015, 08:36:02 pm »
Quote
An import will not respect that setting. It's only for newly created connectors.

q.

Is it not the case that using import for reverse engineering is creating the connectors from scratch as they haven't existed before, and on that basis the setting should be respected.  In other words isn't that a bug worth reporting that the import process doesn't use the setting ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #11 on: February 09, 2015, 09:21:34 pm »
I'm not sure what happens on RE since I don't use it. If the RE creates a diagram and the new connectors are not like in format of the options then I'd regard it as bug.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #12 on: February 10, 2015, 09:01:24 am »
The problem isn't with the code import. It's with the layout method that is being used. The positions it is placing elements in means that it needs to introduce waypoints to prevent the connectors drawing over the elements.

We haven't introduced an option for this layout to prevent it changing the line styles. You could always set the option to disable automatic layout during reverse engineering. You would then have the option to apply a different layout manually after completion.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #13 on: February 10, 2015, 08:36:45 pm »
Hmm. Was has the layout to do with the line style applied when creating a connector?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Import, then Diagram->Layout, routes messed up
« Reply #14 on: February 11, 2015, 08:29:37 am »
I'll assume "Was"="What".

It doesn't. There is an option for reverse engineering to layout diagrams automatically after import. If you don't use it, you'll end up with a diagonal line of overlapping classes. But the connectors should match the style in the option.

As soon as the importer runs the layout function, the line styles are changed to custom by the layout.