Author Topic: jArchi: how to get all elements from specific folder?  (Read 82 times)

David_42

  • Newbie
  • *
  • Posts: 1
jArchi: how to get all elements from specific folder?
« 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.

Phil Beauvoir

  • Archi Master
  • Hero Member
  • *****
  • Posts: 922
    • Archi
Re: jArchi: how to get all elements from specific folder?
« Reply #1 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);
});

If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate