Author Topic: Multiple use of elements in diagram  (Read 2540 times)

bergst

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Multiple use of elements in diagram
« on: July 12, 2017, 10:44:53 pm »
I am trying to place the same element second time in diagram. It is not possible and i get following message:

This diagram already contains an instance of the element you are trying to paste.
Currently, only one instance is supported, so you cannot paste the element here.

Is there a way to solve this problem?

Many thanks

qwerty

  • EA Guru
  • *****
  • Posts: 9672
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: Multiple use of elements in diagram
« Reply #1 on: July 12, 2017, 10:49:36 pm »
You could use virtualized connectors. This will place a "ghost element" on the diagram. Otherwise I'd recommend to not place the same element twice on a diagram as it introduces an ambiguity.

To create such a connector use the context menu of the connector.

q.
« Last Edit: July 12, 2017, 10:51:28 pm by qwerty »

bergst

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Multiple use of elements in diagram
« Reply #2 on: July 12, 2017, 11:13:18 pm »
Perfect, that sounds like a good solution.

But there is one special case:

I created a Block-Diagram including Blocks and Ports. Now it is possible to use these Blocks in an other Block-Diagram, while it is not possible to use these Ports in an other Block-Diagram.

Is there a reason for this behavior? Or is there a workaround for this problem?

Many Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 9672
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: Multiple use of elements in diagram
« Reply #3 on: July 12, 2017, 11:36:09 pm »
Well, I have no idea. You probably need to experiment with that. Honestly, I never ever use those ghost elements (see above).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8471
  • Karma: +207/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple use of elements in diagram
« Reply #4 on: July 13, 2017, 05:09:21 pm »
The fact that you have this problem usually indicates that you are doing something wrong.

It may be that you need instances instead of classifiers, or...
Anyway, figure out what you are doing wrong and the problem goes away.
I've never had the need to put the same element on a diagram twice.

Geert

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Arenīt we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Multiple use of elements in diagram
« Reply #5 on: July 13, 2017, 09:24:20 pm »
Your basic assumption is incorrect- Items being defined in EA are primarily  "types" of items.
So eg. for deployments you can define a device named "router" which specifies certain attributes and behavior. However in complex environments you will certainly want to place several of these on the deployment diagram which, however, are instances of the router type you just defined.

The same applies for class diagrams. Modeling scenarios with eg. multiple credit cards the solution is not to put the credit card class multiple times on the panel but use instance objects instead.

Different example: On some occasions I had component diagrams which went too complex with all these connectors so this might lead to the temptation to have the same component being placed left and right on the diagram to clean up the mess. However this would lead to massive confusion. Therefore the correct approach here would either be to clean  up the connectors mess or split the diagran in several parts with a compound component as the basis- This basically is what Geert was refering too- the problem here is lying in the way modeling is performed, not in restrictions of the tool. Often it is really better to think out of the box and improve overview and modularity instead of approaching problem with a hammer ;)

Oliver

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1112
  • Karma: +77/-72
    • View Profile
Re: Multiple use of elements in diagram
« Reply #6 on: July 14, 2017, 08:17:31 am »
To follow on from Oliver's comments.  Sometimes rather than one element being used multiple times, you actually have another element that is realising the first element.

qwerty

  • EA Guru
  • *****
  • Posts: 9672
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: Multiple use of elements in diagram
« Reply #7 on: July 14, 2017, 08:45:50 am »
The same applies for class diagrams. Modeling scenarios with eg. multiple credit cards the solution is not to put the credit card class multiple times on the panel but use instance objects instead.
Which basically means that one tries to show behavior in a static view. No matter how, the same element more than once on a diagram indicates a design flaw. Or a double crossed mind.

q.

bergst

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Multiple use of elements in diagram
« Reply #8 on: July 19, 2017, 05:25:14 pm »
But lets imagine the following UseCase:

I am designing an electronic device in a block-diagram and every interface of this device is modeled by a port, e.g. UDC_out = 3,3V.
Now imagine following steps:

1. I create 5 diagrams, each diagram for an other electronic device
2. Every diagram/ every device needs an UDC_out
3. I am creating 5 ports, one for each diagram, to use these in my model.
4. Each of these ports has the same meaning
5. I put a desctiption under the "notes"-field

Problem 1: I create a new diagram and i have to create a port again.
Problem 2: If i put a description for the port UDC_out under the "notes" and i want to change this description, i have to do this 5 times.

Wouldnīt it be easier, if i could create a port once and then use instances of this port as i can do it with other elements?

Thanks for help!


qwerty

  • EA Guru
  • *****
  • Posts: 9672
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: Multiple use of elements in diagram
« Reply #9 on: July 19, 2017, 06:10:13 pm »
This more sounds like you use instances (concrete elements). You can create as many instances as you like and place them in a single diagram.

q.

bergst

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Multiple use of elements in diagram
« Reply #10 on: July 19, 2017, 06:39:46 pm »
"This more sounds like you use instances (concrete elements). You can create as many instances as you like and place them in a single diagram."

--> But i canīt create instances from ports, right?

I get following message:

"When dropping embedded elements (Ports, Object Nodes, etc.) on to a diagram, you must drop them on their correct owner."

qwerty

  • EA Guru
  • *****
  • Posts: 9672
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Re: Multiple use of elements in diagram
« Reply #11 on: July 19, 2017, 10:12:36 pm »
You need to drag the port owner to create the instance. You can not instantiate a port solo. The owner has the port in its Structural Elements.

q.