Skip to main content
Participant
September 27, 2012
Answered

How to embed multiple images

  • September 27, 2012
  • 1 reply
  • 9645 views

Hello!

I have been tying to figure out how I could easily embed multiple linked images easily. I have some 1000 .svg  images which have about 1-7 .tif images linked in to them. I now need to get those links embedded and becouse of the amount of images I'm hoping to make an action out of it. I have a script to embed single image in .svg but haven't have luck with multiple embeddings.

Any ideas?

This topic has been closed for replies.
Correct answer Muppet Mark

The sample is a function it will do nothing until called upon…

#target illustrator

embedAllImages();

function embedAllImages(){

    var placedArt = app.activeDocument.placedItems;

    if ( placedArt.length == 0 ) { return; }

    for ( var i = placedArt.length-1; i >= 0; i-- ) {

        placedArt.embed();

    };

};

1 reply

Known Participant
September 27, 2012

How about use a function like:

function embedAllImages(){

    placedArt = app.activeDocument.placedItems;

    if (placedArt < 0) {

    return;

        } else {

    for ( var i = placedArt.length-1; i >= 0; i-- ) {

    placedArt.embed();

    }

}

}

Participant
September 28, 2012

Hi!

Couldn't get it to work. It did't seem to do anything when I ran it through. Have You got this working? Can You tell how?

Muppet MarkCorrect answer
Inspiring
September 28, 2012

The sample is a function it will do nothing until called upon…

#target illustrator

embedAllImages();

function embedAllImages(){

    var placedArt = app.activeDocument.placedItems;

    if ( placedArt.length == 0 ) { return; }

    for ( var i = placedArt.length-1; i >= 0; i-- ) {

        placedArt.embed();

    };

};