Author Topic: Copy-pasting a UI element only gives errror msg.  (Read 7241 times)

mmo

  • EA User
  • **
  • Posts: 84
  • Karma: +0/-0
    • View Profile
Copy-pasting a UI element only gives errror msg.
« on: September 21, 2010, 04:59:10 am »
When trying to duplicate a UI element (in a UI Model) one currently only gets an error 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.
---------------------------
%$#@!
I am trying to draw a couple of dialogs which share many features. It would really be nice if one could first draw one and then duplicate that and continue by changing one of them. Why can't EA not simply give the pasted elements new names (e.g with some name suffix "-2" or whatever but ideally asking for a new name or name-prefix) and then paste that element into the diagram? It's tedious to have to start from nothing each time again!
Every simple paint program can do better and this un-invites from doing such sketches in EA.

Michael
« Last Edit: September 21, 2010, 04:59:58 am by mmo »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Copy-pasting a UI element only gives errror ms
« Reply #1 on: September 21, 2010, 08:46:39 am »
Are you expecting EA to "just know" that you are drawing another dialog instead of re-using the element?

You can copy the elements using Ctrl+C, Ctrl+Shift+V.

Providing you are using 862+ I can also recommend selecting the elements then doing a Ctrl+Drag on the diagram.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy-pasting a UI element only gives errror ms
« Reply #2 on: September 21, 2010, 03:16:13 pm »
Michael,

I think EA's behavior is correct in this instance.
If I use the "normal" copy I don't want to create duplicate of an element, but just show that element on my diagram.
The Ctrl-Shift-V (or Paste element(s) as new) works fine for those cases where you actually want to create duplicates.

Geert

beginner

  • Guest
Re: Copy-pasting a UI element only gives errror ms
« Reply #3 on: September 22, 2010, 04:02:59 am »
In that special case I always would use the Create New for drag/drop. This yields always a new instance of your UI. Which is exactly what you want to express.

Maybe the copy/paste should also respect the diagram setting to actually create a new instance instead of adding the link.

b.

mmo

  • EA User
  • **
  • Posts: 84
  • Karma: +0/-0
    • View Profile
Re: Copy-pasting a UI element only gives errror ms
« Reply #4 on: November 05, 2010, 01:06:16 am »
Quote
Are you expecting EA to "just know" that you are drawing another dialog instead of re-using the element?
...

Quote
I think EA's behavior is correct in this instance.
If I use the "normal" copy I don't want to create duplicate of an element, but just show that element on my diagram....

I contradict! IMHO this not correct! If - in whatever program, in this case in an EA diagram - I select an object and then press Ctrl-C followed by Ctrl-V I expect to create/paste a copy of that object. If an exact copy is semantically not allowed (e.g. names must be unique), then I expect a dialog to pop up asking me for an alternative name or the program to automatically create a copy with a different name, just as e.g. the Explorer (on windows) creates a name with "-copy" suffix. I don't see why that should be impossible "magic"...

Michael
« Last Edit: November 05, 2010, 01:08:27 am by mmo »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Copy-pasting a UI element only gives errror ms
« Reply #5 on: November 05, 2010, 08:51:17 am »
Quote
I contradict! IMHO this not correct! If - in whatever program, in this case in an EA diagram - I select an object and then press Ctrl-C followed by Ctrl-V I expect to create/paste a copy of that object. If an exact copy is semantically not allowed (e.g. names must be unique), then I expect a dialog to pop up asking me for an alternative name or the program to automatically create a copy with a different name, just as e.g. the Explorer (on windows) creates a name with "-copy" suffix. I don't see why that should be impossible "magic"...

There are two possible things that you could be copying.  First, is the representation of the UI element on the current diagram.  This is what EA by default is assuming you are copying.  Second is the actual UI element behind that representation.  That is what the second keyboard shortcut/menu item is for.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy-pasting a UI element only gives errror ms
« Reply #6 on: November 05, 2010, 03:26:44 pm »
Michael,

If you want to use windows as an example, copying a class on a diagram is like copying a shortcut on your desktop. Surely you don't expect that to create a copy of the executable do you?
If you try the same in the project browser then it will create a copy of the element.

Geert