Copy link to clipboard
Copied
Hello! Please tell me, if I have 50 artboards and 50 pictures in the file, each of which needs to be aligned relative to its artboard.. Is it possible to simultaneously align 50 pictures on 50 artboards? If yes, how can this be done?
Copy link to clipboard
Copied
Hello @nutalina,
Thanks for reaching out, and sorry for the late response. I would request you try the steps shared in this tutorial (https://www.youtube.com/watch?v=nk07Tlf8Qw0) and check if it helps.
Looking forward to your response.
Thanks,
Anubhav
Copy link to clipboard
Copied
YouTube vid is about text, not pictures, so this won't work...
OP you'll need to script this, or create an action (although I'm not sure if an action can move from one page to another - Kurt?)... although if you've been waiting since May this is probably no longer an issue...
Copy link to clipboard
Copied
Well, Met, this is rather a task for a script. I can imagine that it might also be possible with an action, but it would be pretty convoluted.
One thing that is always a bit arcane is the term "picture". To me it normally means a raster image, but there are many users that use it in terms of any kind of illustrations that can be done in Illustrator. Therefore it's difficult to suggest something without first taking a look at a sample file.
Copy link to clipboard
Copied
Thanks) But in tutorial they duplicate the same element on several artboards. And I have a lot of different items, so this option will not work( For now I center them manually, but when there are about 100 items, it takes a lot of time.
Copy link to clipboard
Copied
Aligned how? Are these placed items? Can you provide further information with screenshots?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Can you show:
(1) The items before you centre them.
(2) The layers panel of one or more items, fully expanded.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Apparently, you've got one single group on each artboard. Based on that assumption, you may do it in a couple of steps.
It could also be done with an action (partially), but the scripting route is more straightforward in this case.
Copy link to clipboard
Copied
Thank you!
I will try)
Copy link to clipboard
Copied
As @Kurt Gold said, you appear to have one item (a group) per artboard. This simple script should centre these items. It will ignore artboards with >1 item though.
var doc = app.activeDocument;
var ABs = doc.artboards;
var output = "";
for (var i = 0; i < ABs.length; i++) {
ABs.setActiveArtboardIndex(i);
doc.selectObjectsOnActiveArtboard();
var d = doc.artboards[i].artboardRect;
if (doc.selection.length == 1) {
var w = doc.selection[0].width;
var h = doc.selection[0].height;
doc.selection[0].position = [
(d[0] + ((d[2] - d[0]) / 2)) - w / 2,
(d[1] + ((d[3] - d[1]) / 2)) + h / 2
];
}
}
Copy link to clipboard
Copied
Cool script but make sure your items are not on multiple artboards...(I added "bleed" through the script and they overlapped, they won't then sort as individual items on individual artboards)...