Skip to main content
Known Participant
August 16, 2012
Question

Get all items on a layer and then move them all at once

  • August 16, 2012
  • 1 reply
  • 444 views

I'm trying to figure out a way to reposition multiple elements all at once. I have a layer, lets say the name is "GraphBars" and I want to take everything on GraphBars and move it using the .move([x,y]) command.

So basically, Grab all items from "GraphBars" and move said items to a new position.

I'm on cs6 and am working in javascript.

Will something like this work? (newDoc is my document)

newDoc.layers.item("GraphBars").move([ x,y ]);

Or do I need to create a group of the frames within that layer? and then move them?

This topic has been closed for replies.

1 reply

caseyctgAuthor
Known Participant
August 16, 2012

or should it be?

newDoc.layers.item("GraphBars").pageItems.everyItem().move([ x,y ]);