The advantage of having a View within another View is that it allows the viewer to navigate the model, both within Archi and in within the HTML report. Now I'm finding myself looking how to trace what Views are embedded into what other Views, so I'm missing the Analysis and Visualizer tools that we have for Elements, but for the View itself.
So, since is not in the Archi UI, I figured I could do it with jArchi, "Find Current View in other Views"
but can't quite figure out how to do it so any help would be appreciated.
Hi,
Here's a way to do it:
var currentView = selection.first();
console.log('Looking for view "' + currentView.name + '" with id "' + currentView.id + '"');
$('view').find('diagram-model-reference').each(function(o) {
if(o.refView.id == currentView.id) {
console.log('Found in view "' + o.view.name + '"');
}
})
Regards,
JB
Damn JB! I was just typing this when you ninja'd me:
$("view").find("diagram-model-reference").forEach(ref => {
console.log(ref);
});
;D
QuoteDamn JB! I was just typing this when you ninja'd me:
$("view").find("diagram-model-reference").forEach(ref => {
console.log(ref);
});
;D
And in the meantime I even figured out to fix some typos on our wiki (https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#refView) ;D
Thank you both! This is perfect for what I needed it.
BTW, I also noticed that I cannot add Views to the filter in the model tree.