Copy elements between models

Started by jmariani, October 06, 2016, 21:30:42 PM

Previous topic - Next topic

jmariani

Hi.

Any way to copy elements between models?

Use case: I have a model which is a repository of patterns and common elements, and I want to copy from this one to a new model (i.e, views, application components, etc.)

TIA!

Phil Beauvoir

Hi,

not at the moment!

(I know this is a much requested feature)

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé

Hi,

Here is the solution I suggest, using my database plugin (available on GitHup https://github.com/archi-contribs/database-plugin) :

  • Open both models in shared mode. This way, they will be imported as "projects", meaning imported in distinct subfolders of a common Archi model.
  • You may copy (or even move) objects from one project folder to another (please see before.png and after.png captures hereafter).
  • Export them to a database (the plugin support Oracle, Mysql, PostGreSQL, SQLight and even Neo4J at the moment)
  • Import them back from the database, but in standalone mode, meaning each of them in their own Archi model

And voila !


But be careful, if you move an element to another project and if this element is still referenced in a view, then your model will be corrupted. This is something I'm working on (in fact, that's the only point that avoids me to pass my plugin in release 1.0) but at the moment I recommand to be very careful with moves.

Anyway, as your request is about copying elements, there are not such risks ...

Hope this helps.

Best regards
Hervé


Jean-Baptiste Sarrodie

Hi,

In fact this is possible (and easy) using the grafico plugin. A more advanced version has been described here: https://github.com/archi-contribs/archi-grafico-plugin/wiki/Merge-two-(or-more)-models

In short, your export your source and target models using the grafico plugin in two separate directory, then you just copy paste the xml files associated with the elements/relationships/views from the source to the target. An easy way to find which files to copy is to juste remove anything else from the source model, so this basically become a merge (as described in the url above).

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.