How to copy (mode) diagrams from one model to another model?

Hello,
I am trying to copy a mode machine from one model to another model. I cannot copy and paste the diagram or the elements. I tried using the diff merge tool to copy over the mode diagrams and this half worked. It did copy over the mode diagrams to my new model, however, it was very glitchy. I could not rename and modes and now, after closing the model, Capella does not allow me to reopen the model. It says that the “.afm” is missing, despite it still being there.
Does anybody know how I could copy a mode diagram from one diagram to another?
Thanks

Hi,
I failed to reproduce the problem. Here is what I did:

  • Start Capella (1.3.0).
  • Create two Capella projects P1 and P2.
  • Create a Modes & States Diagram in P1, fill it with a few Modes and Transitions.
  • Close projects.
  • Select P1.aird and P2.aird, Compare with -> Each other as models.
  • Configure, “Transfer of elements between models created independently”, Finish.
  • Select the Modes & States diagram in the diff/merge editor and copy it to P2.
  • Select the State Machine and copy its remaining contents to P2.
  • Save, close diff/merge editor.
  • Open P2, open the Modes & States diagram.
  • Rename Modes, make other random changes, save, close session.
  • Open P2 and the diagram again: everything looks all right.
    Is this usage scenario different from yours?
    Olivier

Hi Olivier,
I was using Capella 1.2.1 and 1.2.2. Both models that I was using were complete and contained many different items, my child model had previously had a mode machine in it before (which I deleted before performing the transition). Perhaps this is where conflicts and errors are stemming from in my model.
I’ve since found another way of doing this which involved converting the parent model into a library and then creating an REC of the modes and replicating that into my child model.
Andrew

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.