Author Topic: Show several instances of the same element on one diagram  (Read 3568 times)

Alex9329

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Show several instances of the same element on one diagram
« on: October 13, 2017, 05:09:37 pm »
Hi,

I would like to add several instances(paste as link) of the same element on one diagram. How can I do it?
When I try I receive this message: This diagram already contains an instance of the element you are trying to paste. Currently only one instance is supported, so you can not paste the element here.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8561
  • Karma: +209/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Show several instances of the same element on one diagram
« Reply #1 on: October 13, 2017, 05:16:59 pm »
Since version 12 or 13 there is something called virtual connector ends that sortof kinda does this in a bit weird and Sparxian way.

See http://sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/virtual_routing.html for more info.

Geert


MaXyM

  • EA User
  • **
  • Posts: 67
  • Karma: +5/-0
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #2 on: October 13, 2017, 09:09:54 pm »
BTW what's the reason to have multiple items representing the same element on a diagram?

qwerty

  • EA Guru
  • *****
  • Posts: 9783
  • Karma: +181/-153
  • I'm no guru at all
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #3 on: October 13, 2017, 09:39:30 pm »
Probably some spider web design :-/

q.

Richard Freggi

  • EA User
  • **
  • Posts: 105
  • Karma: +4/-3
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #4 on: October 14, 2017, 03:33:45 pm »
This is really a UML question, not a tool question.  I don't think it makes sense in UML to have multiple instances of the same classifier in a diagram, and if absolutely-positively need to, the correct way to do it is with a generalization (duplicate element IS-A original element).  EA implements the UML standard correctly by not allowing 2 of same classifiers in a diagram. 

Since version 12 or 13 there is something called virtual connector ends that sortof kinda does this in a bit weird and Sparxian way.

See http://sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/virtual_routing.html for more info.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8561
  • Karma: +209/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Show several instances of the same element on one diagram
« Reply #5 on: October 14, 2017, 05:00:07 pm »
This is really a UML question, not a tool question.  I don't think it makes sense in UML to have multiple instances of the same classifier in a diagram, and if absolutely-positively need to, the correct way to do it is with a generalization (duplicate element IS-A original element).  EA implements the UML standard correctly by not allowing 2 of same classifiers in a diagram. 

I'm pretty sure there's nothing in the UML specs that says you can't put an element on a diagram twice.
In fact UML says very little about what you can or can't do on diagram.

But I don't understand your point about generalization. If I wanted to put a an action on a diagram twice, how could generalization help me? I don't even think generalization is allowed between Actions.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 9783
  • Karma: +181/-153
  • I'm no guru at all
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #6 on: October 14, 2017, 06:28:26 pm »
Geert is right that there is no written limitation (though I think there should be one). In fact the UML specs itself use some diagrams where the same element appears more than once on the same diagram. IIRC this has been pointed out by sargasso. I can't recall which diagrams it were and I'm too lazy to find them once again.

q.

P.S. See http://www.sparxsystems.com/forums/smf/index.php/topic,38518.msg239381.html#msg239381
« Last Edit: October 14, 2017, 09:49:15 pm by qwerty »

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1130
  • Karma: +78/-72
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #7 on: October 16, 2017, 07:45:41 am »
BTW what's the reason to have multiple items representing the same element on a diagram?

There is as much design that goes into a creating a view as goes into the underlying model.  There's a direct relationship between the number of times connectors cross and the difficulty in understanding what the view is trying to tell the viewer.

Sometimes you want the same element in different places on the page to untangle the birds nest.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6293
  • Karma: +106/-91
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #8 on: October 16, 2017, 10:50:27 am »
BTW what's the reason to have multiple items representing the same element on a diagram?

There is as much design that goes into a creating a view as goes into the underlying model.  There's a direct relationship between the number of times connectors cross and the difficulty in understanding what the view is trying to tell the viewer.

Sometimes you want the same element in different places on the page to untangle the birds nest.
You may also have views that have NO relationships visible but use with visual embedding or other similar techniques to indicate relationships.  In such cases, having multiple instances is appropriate.

One of the problems with UML is that (originally) it barely mentioned diagrams they weren't even third-class citizens, but undocumented illegal immigrants.   ;)  Since then, as Glassboy has pointed out, we have discovered that they are very productive members of the community. 

The issue for diagrams is that if printed out, you can't tell whether to objects on the diagram are the same object or two separate objects with the same name. 

The virtualised connector end goes some way to alleviating this since it is a formal mechanism for placing the doppelganger into the diagram.  Initially, the doppelganger was visually distinct (to the point where you couldn't tell it was the same thing!).  In later versions, increasing control over the visuals has been made available, but not enough.  What is actually needed is that a true doppelganger is as fully visually configurable as the master, but with a decoration to indicate that it is, in fact, a doppelganger.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #9 on: October 16, 2017, 06:46:16 pm »
What is actually needed is that a true doppelganger is as fully visually configurable as the master, but with a decoration to indicate that it is, in fact, a doppelganger.

Sigh!
What would be nice is something we used in the early 1970's in data flow modelling and that is a duplicate icon for an element - if you senior practitioners remember it was a sort of an inverse of a UML note icon, a box with a filled in triangle in the bottom LHC or RHC - that represented "this element is some where else in this diagram" go see it for actual details.

The trick would be to be able to drag a link between  the original element and the "copyof" icon - this would not change the original link specs just where its geometry goes.

Bruce


b
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

DavidM

  • EA User
  • **
  • Posts: 59
  • Karma: +0/-0
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #10 on: September 04, 2018, 08:48:40 pm »
I think this is quite a pragmatic question. Often I have been in the same situation where you have a large data model, where entities are miles apart, but you want to connect them, it would be easier to have a clone of one element (with an indicator if needed for the pure at heart) to create a cleaner diagram.

Same for UML class diagrams, same for ANY diagram come to mention it.

There is http://sparxsystems.com/enterprise_architect_user_guide/13.5/modeling_tools/virtual_routing.html but it is not perfect

matthew.james

  • EA User
  • **
  • Posts: 139
  • Karma: +4/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #11 on: September 05, 2018, 08:57:16 am »
I agree that this need is very real and quite pragmatic. However, to Sargasso's subtle point, I don't see Sparx moving on this any time soon, probably not at all.

I imagine this constraint is buried so deep in the internals of the Sparx product that removing it would be a fundamental design change and (even if made) would likely break a whole range of other features based around the constraint. The virtual connector ends approach is clearly a kludge, possibly the best that can be done without making the fundamental design change required.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6293
  • Karma: +106/-91
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #12 on: September 05, 2018, 09:43:37 am »
I agree that this need is very real and quite pragmatic. However, to Sargasso's subtle point, I don't see Sparx moving on this any time soon, probably not at all.

I imagine this constraint is buried so deep in the internals of the Sparx product that removing it would be a fundamental design change and (even if made) would likely break a whole range of other features based around the constraint. The virtual connector ends approach is clearly a kludge, possibly the best that can be done without making the fundamental design change required.
They, Sparx, are ALMOST (as usual) already there!  The basic problem is that the Virtual Connector End is an actual object on the visible diagram.  You can select it, move it, make SOME changes to it.  BUT, it is NOT a real diagram object in the t_diagramobject table.  Consequently, you can't do the full gamut of rendering operations on it.

It isn't rocket science to be able to designate a real t_diagramobject as a VCE and so act accordingly.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

matthew.james

  • EA User
  • **
  • Posts: 139
  • Karma: +4/-3
  • Am I supposed to say something here ... ?
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #13 on: September 05, 2018, 11:36:24 am »
@Paolo you may well be right, perhaps there are just one or two more tweaks that are required to make it work in a sensible way.
My assumption was that they haven't taken / can't take those extra steps because of some deep underlying constraint.

Hopefully you're right and I'm wrong :-)
Either way there doesn't seem to have been any real progress from previous feature requests.  Maybe it's time to raise it again, formally ?

Richard Freggi

  • EA User
  • **
  • Posts: 105
  • Karma: +4/-3
    • View Profile
Re: Show several instances of the same element on one diagram
« Reply #14 on: September 05, 2018, 12:27:57 pm »
What's wrong with my initial proposal.
If you want to have different instances of one classifier in a diagram, go ahead and knock yourself out
If you absolutely-positively must have same instances of one classifier in a diagram, create children of the classifier using generalization.  I's the same as using a placeholder / bookmark / virtual thingy but it's 100% UML compliant... no gimmicks needed.

This is really a UML question, not a tool question.  I don't think it makes sense in UML to have multiple instances of the same classifier in a diagram, and if absolutely-positively need to, the correct way to do it is with a generalization (duplicate element IS-A original element).  EA implements the UML standard correctly by not allowing 2 of same classifiers in a diagram. 

I'm pretty sure there's nothing in the UML specs that says you can't put an element on a diagram twice.
In fact UML says very little about what you can or can't do on diagram.

But I don't understand your point about generalization. If I wanted to put a an action on a diagram twice, how could generalization help me? I don't even think generalization is allowed between Actions.

Geert