You're probably looking for something like this:
var nLocale = Context.getSelectedLanguage(); var selGroups = ArisData.getSelectedGroups(); var targetDB = ArisData.openDatabase(there are multiple ways to open a database, I recommend you look into the ARIS Script help to pick one); var mergeComponent = Context.getComponent("Merge"); var mergeOptions = mergeComponent.createMergeOptions(ArisData.getActiveDatabase()); mergeComponent.startMerge(selGroups, targetDB, mergeOptions);
Note that you'll have to adapt the openDatabase method to make it work in your enviroment.
I highly recommend you take a look at the Report Components ARIS has to offer, if you haven't already. There is some interesting functionality hidden in some of those components. You can read more about them in the ARIS script help "ARIS Script" > "Methods for reports and semantic checks" > "Global objects" > "Report component interfaces" > all the sub pages.
In case you're also developing macros, macros have those components too. But you don't have to load them, instead you just directly use Class name [dot] method name (e.g. "Merge.createMergeOptions()").
Hi Kay, thanks for your answer, it really helped me, but for some reason it does not work executing the script from a UML2 Package:
The getLogfileContent() method of startMerge() does not show anything and is not successful. Do you have any idea why? thanks! Ignacio