Archi Forum

Archi Plug-ins => jArchi => Topic started by: michel.wicky on June 21, 2021, 08:40:58 AM

Title: Duplicating 1:1 Views and (corresponding) Element from a Model to Another Model
Post by: michel.wicky on June 21, 2021, 08:40:58 AM
Hello Everybody,
I'm searching for a plugin that allow to duplicates 1:1 (without changing the ids) one or more Views with their corresponding element from a Model to Another one. The goal is to export the target Model in Archimate Interchange format just for a limited set of Views and Elements.
Does something already exists somewhere ?
I just found CopyElementsToModel that partially solve the problem.
Thanks for taking care.
Michel
Title: Re: Duplicating 1:1 Views and (corresponding) Element from a Model to Another Model
Post by: Phil Beauvoir on June 21, 2021, 08:53:21 AM
Hi,

could you simply make a copy of the file, open it and remove all unwanted Views and concepts then export?

Phil
Title: Re: Duplicating 1:1 Views and (corresponding) Element from a Model to Another Model
Post by: michel.wicky on June 21, 2021, 12:00:25 PM
Thank you answering Phil.
We have thousands of elements and many, many views with sometimes confidential information.
It makes more sense to export only the elements and relations of a view.
Title: Re: Duplicating 1:1 Views and (corresponding) Element from a Model to Another Model
Post by: Jean-Baptiste Sarrodie on June 21, 2021, 12:47:15 PM
Hi,

Quote from: michel.wicky on June 21, 2021, 12:00:25 PM
We have thousands of elements and many, many views with sometimes confidential information.
It makes more sense to export only the elements and relations of a view.

That's really easy to create a script which removes everything but the view itself and its content. This involves moving the view to the root of "Views" folder, removing any other view, then running a script like this one (https://gist.github.com/jbsarrodie/aae4ed4981ada94834cfdf48d978a13f).

Regards,

JB
Title: Re: Duplicating 1:1 Views and (corresponding) Element from a Model to Another Model
Post by: michel.wicky on June 21, 2021, 13:07:18 PM
This is making my day !
A nice workaround.
Thanks a lot.