Copy link to clipboard
Copied
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
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");
}
Copy link to clipboard
Copied
If the image has always the same name, you could record an Action.
Copy link to clipboard
Copied
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");
}