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

Script for place item in Illustrator?

Community Beginner ,
Dec 07, 2017 Dec 07, 2017

I am trying to write a script for Illustrator that takes an image from a specific location on my computer and place it on my artboard.  This script should be pretty simple, but I can't seem to find an example of it anywhere?

Can anyone help?

Thanks!

Mat

3.2K
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 1 Correct answer

Community Beginner , Dec 07, 2017 Dec 07, 2017

I found the answer to this:

if ( app.documents.length > 0) {

    doc = app.activeDocument;

var placedItem = doc.placedItems.add();

placedItem.file = new File("image.jpg");

}

Translate
Adobe
Community Expert ,
Dec 07, 2017 Dec 07, 2017

If the image has always the same name, you could record an Action.

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 Beginner ,
Dec 07, 2017 Dec 07, 2017
LATEST

I found the answer to this:

if ( app.documents.length > 0) {

    doc = app.activeDocument;

var placedItem = doc.placedItems.add();

placedItem.file = new File("image.jpg");

}

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