• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Pasting into multiple layers

New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hi

Does anyone know if its possible to paste the same thing into multiple layers with one click in Illustrator? I'm aware of the 'paste on all artboards' option, however thats not an option for me. I'm working in layers of more than 100 + and at the moment the only way of duplicating the same thing onto all layers is to tediously copy and paste in front on every layer, any solutions would be much appreciated.

 

thanks

nick

Views

4.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 13, 2019 Nov 13, 2019

Hi nick, try this script. Select the text in the top-most layer, the script will copy it to all other layers except the first one.

 

 

// copy selected object to all layers
// carlos canto
// https://community.adobe.com/t5/Illustrator/Pasting-into-multiple-layers/td-p/10735655

var idoc = app.activeDocument;
var sel = idoc.selection[0];

for (var a=1; a<idoc.layers.length; a++) {
    sel.duplicate(idoc.layers[a], ElementPlacement.PLACEATBEGINNING);
}

 

Votes

Translate

Translate
Adobe
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Check in the flyout menu of the Layers panel (upper right) and make sure that Paste Remembers Layers is checked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

thanks for reply, i have looked at that option and that just allows you to copy and paste from one file to the next keeping it as layers rather than flattening it, however it doesnt allow you to paste into multiple layers at a time, even with that checked and all layers selected i can only paste into 1 layer still?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

What you want doesn't exist as a feature, presumably because having the same element(s), at the same coordinates, on 100+ layers is not an intended workflow. Having that content visible on one layer is all that's needed for it to appear on the artboard in a typical scenario. I realize there may be exceptions like cumulative animation sequences and such, but there are other ways to go about that rather than an after-the-fact paste. So specifically, why do you need that one thing on all layers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

each layer needs a different text annotation added in the same place using a basic framework, so as opposed to the very long way of individually writing full text on , i am copying and pasting on every layer a generic text and then editing a small portion of this on every layer, this then identifies each layer which i need to do before i can proceed any further. these artworks come to already in layers and there is no other option to have them presented another way. (its for screen printing btw)

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

 

". . . pasting on every layer a generic text and then editing a small portion of this on every layer . . ."

 

Hmmm, so if you have to visit each layer one-by-one to make that edit anyway, why is it a problem to just tap Ctrl/Cmd+F to paste in front before making the edit? What am I missing?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

1 have a 100 or so files to do with some that have upwards of 250 layers, being able to potentially click once and have it pasted in front of all layers will save me an incredible amount of time, plus this is not the only instance where i have to do further pasting into all layers later on, seems incredible that illustrator does not have this as an option to me....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

also worth knowing i cant do this at output stage as after the individual id's are in place within the artwork am i then able to continue artworking each layer

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

"1 have a 100 or so files to do with some that have upwards of 250 layers, being able to potentially click once and have it pasted in front of all layers will save me an incredible amount of time, plus this is not the only instance where i have to do further pasting into all layers later on, seems incredible that illustrator does not have this as an option to me...."

 

It sounds like only one layer at a time will be visable for each output instance. If that is the case, using Variable Data might just save you a ton of time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Yes, or a script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hi nick, try this script. Select the text in the top-most layer, the script will copy it to all other layers except the first one.

 

 

// copy selected object to all layers
// carlos canto
// https://community.adobe.com/t5/Illustrator/Pasting-into-multiple-layers/td-p/10735655

var idoc = app.activeDocument;
var sel = idoc.selection[0];

for (var a=1; a<idoc.layers.length; a++) {
    sel.duplicate(idoc.layers[a], ElementPlacement.PLACEATBEGINNING);
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

hi Carlos

 

thanks for this although im having trouble installing it script editor is saying "A identifier can’t go after this identifier."?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

You don't need to install it with the script editor.

You can simply open the script using the File menu > Scripts > Other Script...

Or install it in the meru:

https://helpx.adobe.com/illustrator/using/automation-scripts.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

hi

i have to copy and paste the above into something (script editor?) to then save it to then be able to run it from illustrator, thats where i'm getting the above error message and illustrator will not open it saying "this script contains uncomplied changes and cannot be run" ? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

You need to copy the script, paste it in a text editor in a text only document (.txt) and save it with a .jsx extension.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

thanks for your help btw, however after folowing your instruction im getting the attachedScreenshot 2019-11-14 at 14.36.03.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

Did you select the object you want to duplicate on all layers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

yes that worked! thanks very much for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

Hi Carlos

 

that has worked a treat, thanks very much for your help!

 

all the best

 

nick

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

you're welcome nick.

 

Thanks for the assistance Ton!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 23, 2022 Mar 23, 2022

Copy link to clipboard

Copied

Hi Carlos,

It seems that this script only copies the TOP MOST object SELECTED in a given layer even if you have multiple objects selected.  Any chance you could modify it so it copies everything selected to the rest of the layers?  Or tell me what to modify?  Even better would be if it copied everything selected from ANY layer and pasted into all the other layers except the source layer(s).

 

Either way, this script is super helpful, thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2022 Mar 23, 2022

Copy link to clipboard

Copied

I wrote a script for that in 2013, I couldn't find the post but here's a copy of the script

 

//  copySelectionToAllLayers.jsx;   // carlos canto // 07/06/13
//  http://forums.adobe.com/message/5481849?tstart=0#5481849

//#target Illustrator

var idoc = app.activeDocument;
selec = idoc.selection;
if (selec.length>0) {
	
	var layers = idoc.layers;
    var layercount = layers.length;
	for (j=0; j<selec.length; j++) {
        var obj = selec[j];
        for(i=0; i<layercount; i++) {
            var ilayer = layers[i];
            var sel = obj.duplicate(ilayer,ElementPlacement.PLACEATEND)
        }
        obj.remove();
	} 
}
else {
	alert("select something before running");
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 24, 2022 Mar 24, 2022

Copy link to clipboard

Copied

Perfect!  Works great, thanks Carlos!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 01, 2023 Dec 01, 2023

Copy link to clipboard

Copied

Hi Carlos,

I think the second script you provided in this thread (to Emac_trademark) would almost work for something I am trying to automate.

 

I have multiple files with 125 layers, and I wish to paste (in place) a selection of objects onto the top 25 layers, and then a different selection of objects to the next 25 layers, and so on. So, I have five unique groups of objects to select and paste into 25 layers each. I have been doing it one layer at a time...

 

Could the script be edited to only paste into the 24 or 25 layers below the selected object. And would it only paste what is selected from the top layer or the entire contents of the layer? (I am hoping to only have it pasted what I have selected or selected and copied to clipboard.

 

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines