Archi Forum

Discussion Boards => jArchi => Topic started by: David Skarka on November 27, 2018, 15:08:48 PM

Title: jArchi: how to get all elements from specific folder?
Post by: David Skarka on November 27, 2018, 15:08:48 PM
I am trying to write a script for checking, whether all Archimate elements from a specific folder are in some view.
Is there a way, how to get elements from the folder?
Many thanks for the help.
Title: Re: jArchi: how to get all elements from specific folder?
Post by: Phil Beauvoir on November 27, 2018, 15:16:41 PM
Assuming that you reference the selected folder(s) by using the global variable "selection" then the following iterates over all child elements of the folder:

selection.children().each(function(element) {
    console.log(element);
});