Last active
October 11, 2024 09:39
-
-
Save adgerrits/1f882ab3d13069c8ba47a74b544042d9 to your computer and use it in GitHub Desktop.
#jArchi script to show for selected elements in which views they are used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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); | |
console.log(e.type + ' ' + e.name + " is not used in a view") ; | |
console.setDefaultTextColor(); | |
} | |
$(e.concept).objectRefs().each(function(or) { | |
console.log(e.type + ' ' + e.name + " is used in view: " + ": " + or.view.name); | |
}); | |
} else { | |
console.setTextColor(128,128,128); | |
console.log(e.type + ' ' + e.name + ' is not an Archimate concept'); | |
console.setDefaultTextColor(); | |
} | |
}); | |
} | |
console.clear(); | |
UsedInViews(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment