Skip to main content
July 11, 2012
Question

RasterItem .file property with broken link

  • July 11, 2012
  • 1 reply
  • 1174 views

Hi,

I want to get the "file.displayName" property of a RasterItem from a file where links are broken.

the script :

myItem = app.activeDocument.selection[0];

myItem.file.displayName;

works fine if the RasterItem source file is where the link points at.

In my case, the link points to the local drive of another computer, so the "file" property of the RasterItem doesn't exists !!!

I don't understand why, because all the informations are in the Links pannel of illustrator.

Can anyone help me with that ?

Thanks

This topic has been closed for replies.

1 reply

Inspiring
July 11, 2012

AI is storing the data that is visible in the GUI in the file's XMP ( may be else where in file too ). Script only has access to the linked file if it exists… For embedded rasters where the original is no longer available parse the XMP string?

July 11, 2012

damned...

indeed XMP string contain the information, but parsing the file then linking to the right object...

I'll probably try to work with linked file on a server drive !

Inspiring
July 11, 2012

What are you trying to do with the file do you need it?