Archi Forum

Archi => General Archi Discussion => Topic started by: architekt on November 17, 2016, 13:19:50 PM

Title: How to handle multiple duplicates? Merge?
Post by: architekt on November 17, 2016, 13:19:50 PM
Hi,

We have many views which contain similar elements. When validating the model, we see many "Possible duplicate" warnings. Is there a way to merge? or replace elements that are duplicate? We can do this removing elements from model and placing one element which is being used in multiple views. My question, how do other people handle this and is there a efficient way to handle multiple duplicates elements?
Title: Re: How to handle multiple duplicates? Merge?
Post by: steen.jensen on November 17, 2016, 18:52:23 PM
If each duplicate is of same type, just make some XML script (Notepad++) directly on Archimate file. its just xml based (i hope!) or use Open Excange file format

Quick & dirty merge of two separate models:
Open the 2 models that you want to merge in Archi
Open each view on source model, select all elements (menu)
Paste in new view on target model
Repet for each view.
Now you get lots of copy element.
Use Archimate or XML file for scripting:
Run script that removes word (copy) in each element name
Run merge script that replace all duplicated elements with its 1:A occurence
(ex if 5 duplicates element, the 1:a is the master)
(Script have to use 1:a elements guid in all relevant relations for each duplicate)
Delete all duplicated elements

Happy scripting 8)
Title: Re: How to handle multiple duplicates? Merge?
Post by: Timur on February 25, 2018, 18:48:08 PM
what is it 1:a elements?
Title: Re: How to handle multiple duplicates? Merge?
Post by: steen.jensen@sll.se on March 07, 2018, 16:54:13 PM
When you have several copies of an element, you have to decide witch one should be master, I use 1:a element of each copyd element in my script (Simple Notepad++ script)

If you change element type this way, you have to understand that some relations types are not allowed (Archimate 3 standard), But  validate model after each script run to find errors