Artbobard Name from Selection?


#1

How do I get name of Artboard from selection?


#2

go to this


#3

or like this

function myPluginCommand(selection) {
	var rootnodes = selection.insertionParent.parent;
	//console.log(rootnodes);
	rootnodes.children.forEach(element => {
		//This is ArtBoard
		let artboardname  = element.name;
        }
}

#4

Thanks! Is it possible to grab all dartboards without having a selection? Lets say I want to ignore what is selected and just look at all available artboards?


#5

yes, try to understand this if not ask me