Author Topic: Copy diagram from one .eap file to another  (Read 21182 times)

K N

  • EA User
  • **
  • Posts: 98
  • Karma: +0/-0
    • View Profile
Copy diagram from one .eap file to another
« on: June 20, 2013, 02:19:05 am »
Is there any other way (other than import/export) to copy a diagram from one .eap file to another or from .eap file to a package in EA repository (MySQL repository)?

Thanks
KN

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #1 on: June 20, 2013, 02:22:29 am »
In short: No!

K N

  • EA User
  • **
  • Posts: 98
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #2 on: June 20, 2013, 02:26:33 am »
Thanks Makulik!!!

Any other shortest way that you know of?

sometimes import/export also takes longer (esp with the repository).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #3 on: June 20, 2013, 02:43:57 am »
May I ask why you want to do that? A diagram is a user aspect of the model containing model elements. Another model is either a copy (then containing also the diagram) or something (completely) different.

q.

K N

  • EA User
  • **
  • Posts: 98
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #4 on: June 20, 2013, 02:48:45 am »
Sure qwerty...

The scenario is something like this:

One of the EA repository users has a diagram in a local .eap file. She wants to add that diagram to one of the packages in the repository. So as a normal thinking of copy-paste she tried doing it and was not able to.

I know that we can copy and paste the diagram in the same .eap file.

And I was trying to find another way instead of import/export how to copy that same diagram - as something users are not that patient in working with the repository.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #5 on: June 20, 2013, 02:58:07 am »
I see. The problem with such external copies is that they diverge from the "main" model. In that case the VC config might be useful. Or using controlled packages.

Of course you could write an add-in which supports copy/paste across model boundary. But that would make the situation even worse. In any case you should ex-/import a whole package with changes and then replace the offline model with a fresh copy.

q.

K N

  • EA User
  • **
  • Posts: 98
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #6 on: June 20, 2013, 03:06:27 am »
Thanks qwerty!!

I think I will go with the option of import/export.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #7 on: June 20, 2013, 05:28:03 am »
Quote
Thanks qwerty!!

I think I will go with the option of import/export.

The key for solving this might be consistency of model GUIDs. I think a simple export/import might not work for your case, since the master model might refuse importing a package using an already present GUID.

Usual setup for such scenarios should use VCS controlled packages, but that's obviously too late.
I'm afraid you'll need to strip GUID's for import and rearrange the changes manually. At least define a baseline of the master model before doing so, merging existing stuff might appear hairy to impossible anyway.

Sorry, I know that doesn't help much,

Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #8 on: June 20, 2013, 06:53:27 am »
Günther is right - in principle. However, you can re-import a modified package without stripping GUIDs. But that will replace the master with the identity of the offline copy.

What I do in such cases is the following: move all touched elements to a temp package. Also new diagrams. Then ex-/import that package and move the elements to where they belong. If you have just added a new diagram then you just need to move the diagram. This is rather save.

What you should NOT do is to change model integrity be changing relations. If you do that offline your re-import might end in a mess you need to clean up tediously.

q.
« Last Edit: June 20, 2013, 06:55:10 am by qwerty »

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #9 on: June 20, 2013, 10:01:47 am »
Quote
Günther is right - in principle.

In practice  :P, have been struggling with similar export/import problems today ...

At least I was lucky we have a VCS controlled model and I could successfully rollback everything. I had to find a completely different way to integrate the diverging changes (manual refactoring).
« Last Edit: June 20, 2013, 10:12:33 am by g.makulik »
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #10 on: June 20, 2013, 05:16:36 pm »
Which is what my last paragraph said...

q.

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #11 on: June 21, 2013, 02:38:42 pm »
K_N wrote:
Quote
One of the EA repository users has a diagram in a local .eap file. She wants to add that diagram to one of the packages in the repository. So as a normal thinking of copy-paste she tried doing it and was not able to.

Have you tried two instances of EA open - then Ctrl+C on the source Package - Ctrl+V on the second EA instance Package. The copy is stored to the Clipboard and so is copyable. Note a diagram requires its Elements from the Package - hence the need to copy the Package containing the diagram.
« Last Edit: June 21, 2013, 02:41:33 pm by Dermot »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #12 on: June 22, 2013, 10:19:07 pm »
That would be a smart one. But it does not work. I made a copy of an EAP, opened both EAPs and tried to copy/paste between the instances.

q.

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #13 on: June 24, 2013, 02:37:50 pm »
Qwerty, not sure why this would not work - I use it extensively.
Select a Package in the Project Browser - then Ctrl+C -> dialog "Copying Package to Clipbaord", then do the same in the other instance and Ctrl+V.
This feature has been around for some time.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Copy diagram from one .eap file to another
« Reply #14 on: June 24, 2013, 03:18:09 pm »
I have also just been copying PACKAGES between models quite easily. You cannot copy diagrams by themselves - perhaps that is where the problem lies. If the source package has too many 'other' things in it, copy the required diagram and its elements to a new package so that they are on their own, and copy that new package entirely from one instance of EA into the other instance of EA. Does it work now?
Best Regards, Roy