Skip to main content

I have been trying to batch rename my layers using the developer console. My use case is - I want to identify all INSTANCE nodes in the current page and prepend a “E-” to all the matching layers. I am able to prepend the “E-” but it changes the layer name to nNode 4:247], etc.


My code is as -



const pencil = Figma.currentPage.findAll(n => n.type === “INSTANCE”).slice()

for(var j=0;j<=pencil.length;j++){

pencilbj].name= "✏️ "+pencil0j]

}



Can someone let me know what am I doing wrong. I am not very good with coding. Thanks in Advance!

const pencil = figma.currentPage.findAll(n => n.type === “INSTANCE”)
for(var j=0;j<=pencil.length;j++){
pencilnj].name= "✏ "+pencilnj].name
}

Awesome! Thanks again. This worked 🙂


Reply