Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: EricP 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
-
Try Tools/Options/Links/Default Style
q.
-
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?
-
Well, either by hand :-X, using a SQL or via API. What would you prefer?
q.
-
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
-
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.
-
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
-
An import will not respect that setting. It's only for newly created connectors.
q.
-
An import will not respect that setting. It's only for newly created connectors.
So I see. So, back at square 1.
-
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 (http://www.sqlmaestro.com/products/anysql/maestro/)
Geert
-
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 ?
-
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.
-
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.
-
Hmm. Was has the layout to do with the line style applied when creating a connector?
q.
-
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.
-
Ah - lol - yes. That's German for what. Too late...
But that would bring up the question why auto-layout changes connector style, wouldn't it?
q.
-
As soon as the importer runs the layout function, the line styles are changed to custom by the layout.
Why don't the line styles conform to the Default style set by the user?
-
But that would bring up the question why auto-layout changes connector style, wouldn't it?
Why don't the line styles conform to the Default style set by the user?
The answer to both of your questions has already been answered by my previous post.
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.
-
Oh yes. Short time memory is getting worse when you're aged. Thanks.
q.
-
I wrote an EA-Matic script to configure my own default line styles per connector type and update all the connectors in a diagram to said default styles: Configure your own default line styles in Enterprise Architect with EA-Matic (http://bellekens.com/2015/03/14/configure-your-own-default-line-styles-in-enterprise-architect-with-ea-matic/)
Geert