Skip to content

Instantly share code, notes, and snippets.

View adgerrits's full-sized avatar
💭
Happy

Ad Gerrits adgerrits

💭
Happy
View GitHub Profile
@adgerrits
adgerrits / ShowMissingElementsInTwoViews.ajs
Last active April 10, 2021 19:16
#jArchi script to compare two views and show mutual missing Archimate elements
/*
* Comparison of two views to see which Archimate elements are missing
* 2018, Ad Gerrits
*/
console.clear();
function checkViews (v1, v2) {
var v2elements = [];
$(v2).find('element').each(function (e) {
v2elements.push(e.concept.id);
@adgerrits
adgerrits / UsedInViews.ajs
Last active October 11, 2024 09:39
#jArchi script to show for selected elements in which views they are used
/*
* Show for selected elements in which views they are used
* 2019, Ad Gerrits
*/
function UsedInViews() {
$(selection).each(function(e){
if (typeof(e.concept) !== 'undefined') {
if($(e.concept).objectRefs().isEmpty()) {
console.setTextColor(255,0,0);
@adgerrits
adgerrits / MergeTwoElements.ajs
Last active February 23, 2020 10:51
#jArchi script to merge two elements
/*
* Select 2 elements of the same type and merge the second one into the first one.
* Optional: delete the second one when it's not in use anymore.
* 2019, Ad Gerrits
*/
function q(text) {
return '"' + text + '"';
}