Hi,
Is there a way by script to find if the object or link is used or not in the model?
I checked in the documentation but I can't find anything.
This will allow to clean up the model by script.
Thank in advance.
Hi, for elements and relations you'll need to use viewRefs:
https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Collection#viewrefs
For example:
selected = selection.first();
selectedConcept = selected.concept;
console.log(isUsedInView(selectedConcept));
function isUsedInView(concept) {
return !$(concept).viewRefs().isEmpty();
}
Thank it work :)