Book a Demo

Author Topic: Bulk change of connector style  (Read 15578 times)

Sarah H.

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Bulk change of connector style
« on: May 15, 2015, 08:47:31 pm »
Hello,

I got diagram from my colleague and all connectors have style Custom and I need to change it to Auto Route. Any chance how to do it for all coonectors in a bulk?
I tried to find this atribute in DB, but no luck.

Anyone able to help me, please?

Thank you,

Sarah

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Bulk change of connector style
« Reply #1 on: May 15, 2015, 09:20:24 pm »
You need to change the MODE attribute in t_digramlinks.styleex so it is MODE=2; (see p. 13 of 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: Bulk change of connector style
« Reply #2 on: May 18, 2015, 04:35:27 pm »
Have a look at this script: Configure your own default line styles with EA-Matic
Or at the script in the downloadable .eap file from the webinar  Introduction to scripting with Enteprise Architect

You then simply have to loop all diagrams and change the style iso only the current diagram.

Geert

Pkhaiat

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • If it ain't broke, don't fix it.
    • View Profile
Re: Bulk change of connector style
« Reply #3 on: May 20, 2015, 05:26:41 am »
With the help of Geert's script, I have just written one which changes the style of all connectors for selected elements on a diagram to a user-selectable style. You are welcome to a copy if you like.

- PJK

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bulk change of connector style
« Reply #4 on: May 20, 2015, 09:14:53 am »
In version 12 you can also use the relationships window to do it via the gui.

Select all the elements on the diagram, (in the build I currently have installed I then needed to click on one element again to fill the window)

Select all the connectors in the relationships window and select Line Style | Auto routing from the context menu.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Bulk change of connector style
« Reply #5 on: May 21, 2015, 01:48:08 pm »
Simon, I love the intent of what you say, but there is something missing in translation for me, I can't get to second base.
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Bulk change of connector style
« Reply #6 on: May 21, 2015, 03:13:45 pm »
Quote
Simon, I love the intent of what you say, but there is something missing in translation for me, I can't get to second base.
Open the Relationships window (Ctrl+Shift+2), select all the elements on the diagram so that all their relationships appear in the Relationships window (Ctrl+A appears not to work for this), select all the relationships in the Relationships window (Ctrl+A appears not to work for this either), right-click on one of the selected relationships and you will see Appearance and Line Style commands that can be applied to all selected relationships.
The Sparx Team
[email protected]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bulk change of connector style
« Reply #7 on: May 21, 2015, 03:22:42 pm »
Quote
I can't get to second base.
Not something I can help with I'm afraid. ;)

In terms of this feature though...  I just installed 1209, and it is working for me.

Open a diagram and the docked relationships window.
Select one or more elements on the diagram.
If you used Ctrl+A or Edit | Select by Type, click on one of the selected elements to fill the relationships window.
Select any connectors you want to change in the relationships window. (multiple selection supported)
Right click, and select anything from the Line Style sub-menu.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Bulk change of connector style
« Reply #8 on: May 21, 2015, 04:13:02 pm »
Hmm, if I were the analyst who asked for this feature I would tell my developer to start over again.

- There's a difference between selecting elements with Ctrl-A and using the mouse? (the relations only show up in the relationship window when using the mouse)
- For some relations the Line Style context menu is disabled, although I have all elements on the diagram locked, including the owning package. It seems that the menu option is disabled for any relation to an element that is not locked.
- If for one of the selected relation the menu option is disabled then it is disabled for the whole selection. (which effectively means I can never use this feature unless I lock the whole repository, or I figure out one by one which relation I can change and which I can't)
- Not all Line Styles are available from this context menu !?!

For now I'll stick to my script  :-X

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Bulk change of connector style
« Reply #9 on: May 21, 2015, 06:33:17 pm »
I wouldn't see the point in changing a graphical representation in a GUI environment where you do not see changed element at all. Another EAUI.

q.

Sam Courtney

  • EA User
  • **
  • Posts: 58
  • Karma: +1/-0
    • View Profile
Re: Bulk change of connector style
« Reply #10 on: May 22, 2015, 12:03:11 am »
Great points - why can't we just select the relationships on the diagram that we want to change and select the change to be made w/o having to select them to open in the relationships window? Clearly the requirement has been muddled and delivered with some easter egg features.  :P

Pkhaiat

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • If it ain't broke, don't fix it.
    • View Profile
Re: Bulk change of connector style
« Reply #11 on: May 22, 2015, 12:20:02 am »
Simon: thanks for the pointer - it does indeed work in V12, but for some reason the Horizontal & Vertical Tree styles do not appear in the context menu. Any reason why not?

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Bulk change of connector style
« Reply #12 on: May 22, 2015, 07:17:49 am »
KP and Simon, that is most helpful.

I note however that the Line Style option is greyed out for
Information Flow; Note link; Assembly; Sequence;
but then I noticed these are for relationship that are not on the current diagram. (i.e. Selecting all will generally not be helpful)

So I sorted by the view column, grouping all the connections actually on the diagram in focus. The ones with Hidden or Visible then can be all selected and amended with the Line Style context item.

I agree that it would be useful also to have Tree Style and Lateral,
and also Bezier.
« Last Edit: May 22, 2015, 07:20:49 am by skiwi »
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bulk change of connector style
« Reply #13 on: May 22, 2015, 08:50:33 am »
Quote
Hmm, if I were the analyst who asked for this feature I would tell my developer to start over again.
I agree it's a problem that ctrl+a doesn't fill the window. I believe there was a change in progress to fix that.

Changing the way the commands are enabled so that it skips over invalid items instead of disabling all would make sense, but I'm not promising anything. As a workaround, enable the filter bar and filter only on visible connectors.

The available line styles are consistent with the styles that are available for all connectors.