Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Aperture 3 - path to referenced master image file

Can anyone supply a code sample to get the path to a referenced master image file in Aperture 3? I am using the file information to call EXIFtool in a shell script. The code below works for managed images, but not for referenced images. I put in the choose file dialog as a workaround.

on getPath(aItem)
tell application "Aperture"
tell library 1
tell aItem
set MasterFile to (get value of other tag "FileName")
set isReferenced to get referenced
if isReferenced then
set FinderPath to choose file MasterFile with prompt "Please locate referenced file"
set thePath to POSIX path of FinderPath
else
set ImpGroup to (get value of other tag "ImportGroup")
set MasterPath to my GetMasterPath(ImpGroup)
set MasterPath to my getLibPath() & MasterPath
set thePath to quoted form of (MasterPath & MasterFile)
end if
end tell
end tell
end tell
return thePath
end getPath


Thanks in advance.

iMac 27", Mac OS X (10.6.7), MacBook Pro

Posted on Apr 3, 2011 7:35 AM

Reply

There are no replies.

Aperture 3 - path to referenced master image file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.