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

Select Multiple Objects then Paste much like the Place command with multiple files Illustrator

New Here ,
Oct 13, 2025 Oct 13, 2025

Is there a way to select mutiple objects in a Illustrator doc and then paste each selection individually in that same file just like selecting and placing mutiple files into an Illustrator doc? 

TOPICS
How-to , Scripting , Tools
303
Translate
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 2 Correct answers

Contributor , Oct 14, 2025 Oct 14, 2025

sounds like a data merge workflow/script would solve your problem

Translate
Community Expert , Oct 15, 2025 Oct 15, 2025

here's a basic test case script that will replace placeholder items in Layer 1, with source items in Layer 0 (top layer)

 

set up you test file like this

CarlosCanto_0-1760588881527.png

 

the script will match each Layer 1 placeholder item's size and position to each Layer 0 source item, then it will remove the placeholder item

 

result

CarlosCanto_1-1760589116544.png

 

// replace placeholder items
// place source items in layer 0
// place placeholder items in layer 1

function main() {
    var idoc = app.activeDocument;
    var sourceLayer = idoc.layers[0
...
Translate
Adobe
Contributor ,
Oct 13, 2025 Oct 13, 2025

in the simplest form you can do the following

app.executeMenuCommand('selectall');
app.copy(); //loads content to the clipboard
app.activeDocument = /* select new document here */
app.paste(); //pastes the content

 

if you want to be more selective for what you copy you would just need to do a loop of content and change their .selected value to true and then copy/paste.

Translate
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 ,
Oct 13, 2025 Oct 13, 2025

It might be worth elaborating on exactly what you want to do @epic_Eclipse6433. Be as specific as you can, and posting a small example document is good too.

Translate
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 ,
Oct 13, 2025 Oct 13, 2025

I think the OP wants to "load" the copied objects to a "Pasting Gun" to click and paste one at a time, similar to the way Placing multiple files works

Translate
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 ,
Oct 14, 2025 Oct 14, 2025

This is exactly what I am wanting to do. "Pasting Gun" is the perfect description. Exactly like Placing multiple files works.

 

Translate
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 ,
Oct 14, 2025 Oct 14, 2025

can you elaborate on your workflow? why do you need such a feature? since there's no native feature or scripting api for "paste gun" perhaps someone comes up with a different approach to the problem

 

for example we could do it in reverse. 

1. use the Paintbrush Tool (B) to click as if it was your placing gun. The paths created would be used for placement

2. copy the objects you need to place with the gun

3. use a script to place the selected objects at the locations created by the Paintbrush Tool in step 1

 

 

 

Translate
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 ,
Oct 14, 2025 Oct 14, 2025

Carlos,

 

1. I normally create placeholder icons where I need to paste the objects. 

2. I currenlty select one object at a time and move it over to my placeholder icon. (Such a pain)

3. I would like to select multiple objects to copy over and paste each object on the placeholder icon one after another however I have no script to do this. 

 

Think of the workflow like a brick wall where each brick in the wall represents a placeholder icon. Each brick in the wall is a specific size. On a seperate artboard there are 100+ objects that are sized the same as the bricks that make up the wall.  I need to select the objects randomly and then paste individulally onto a brick in the wall until all bricks have an object pasted on them. If I had all 100+ objects saved as PDF's or images I could easily go in and select them all by using the Place command and then "paste gun" them on each brick. The objects are different everytime and are rarely individual PDF's or images, hence the problem.

Translate
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
Contributor ,
Oct 14, 2025 Oct 14, 2025

sounds like a data merge workflow/script would solve your problem

Translate
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 ,
Oct 15, 2025 Oct 15, 2025

I will look into Data Merge. I tried that once before and it didnt seem to work as it does in InDesign. But I will check it out. Thank you so much for helping. I really appreciate it 

Translate
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 ,
Oct 14, 2025 Oct 14, 2025

If you are referring to the way a lot of these clipboard extensions do it: no.

And if you use a clipboard extension (system plugin), then most probably Illustrator will give you a lot of issues.

Translate
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 ,
Oct 15, 2025 Oct 15, 2025
LATEST

here's a basic test case script that will replace placeholder items in Layer 1, with source items in Layer 0 (top layer)

 

set up you test file like this

CarlosCanto_0-1760588881527.png

 

the script will match each Layer 1 placeholder item's size and position to each Layer 0 source item, then it will remove the placeholder item

 

result

CarlosCanto_1-1760589116544.png

 

// replace placeholder items
// place source items in layer 0
// place placeholder items in layer 1

function main() {
    var idoc = app.activeDocument;
    var sourceLayer = idoc.layers[0];
    
    // if first layer is empty, then skip
    if (sourceLayer.pageItems.length > 0) {
        var sourceItems = sourceLayer.pageItems;
        var sourcecount = sourceItems.length;

        var placeholderLayer = idoc.layers[1];

        var placeholderItems = placeholderLayer.pageItems;

        for (var a=sourceItems.length-1; a>=0; a--){
            sourceItems[a].width = placeholderItems[a].width;
            sourceItems[a].height = placeholderItems[a].height;
            
            sourceItems[a].position = placeholderItems[a].position;
            sourceItems[a].move(placeholderLayer, ElementPlacement.PLACEATEND);
        }

        // REMOVE PREVIOUS PLACEHOLDER ITEMS
        for (var b=0; b<sourcecount; b++) {
            placeholderLayer.pageItems[0].remove();
        }
    }
}

main();

 

Translate
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