How do I retrieve the path of folders and name of a view or element via jArchi?
e.g. "Views\Folder 1\Folder 2\My Archimate View 1" or "Business\Business Actor"
You can use .parents() on a collection. So, for example, if you select one node on the models tree ("selection"):
var path = "";
var parents = selection.parents();
for(i = parents.length - 1; i >= 0; i--) {
path += "\\" + parents[i].name;
}
path += "\\" + selection.first().name;