Copy link to clipboard
Copied
Hello,
Is is possible to place an asset (jpg) from a Shared Adobe CC library on a PSD layer with jsx code?
I tried to link directly to the online library:
Thanks,
fred
Copy link to clipboard
Copied
so
var appData = Folder.userData;
the var appData may work on both PC and Mac for the beginning of the path. I do not use Cloud libraries so I do not know where local library copy may be.
var assetFile = new File(appData + '/Adobe/Creative Cloud Libraries/LIBS/xxx_AdobeID/creative_cloud/xxx/xxx-c5ae61c21adf/components/asset.jpg')
Copy link to clipboard
Copied
This is not likely to work. You'll need to download the asset first.
Copy link to clipboard
Copied
Hello,
Thank you all for your help. Here is where I am so far:
Using the ScriptingListenerJS, I am able to retrieve le path to the asset in my local computer. Unfortunately, the name I need to place the asset on the PSD is not "b73bfca4-352b-4173-b53f-f3bf96382daf.jpg" but "RDV_843.jpg" ... In another word, how can I get the real name to do this:
new File( "/Users/fred/Library/Application Support/Adobe/Creative Cloud Libraries/LIBS/0509FD58579F38307F000101_AdobeID/creative_cloud/dcx/da4c9e1a-8bc8-4966-8ae1-c5ae61c21adf/components/RDV_843.jpg" ) );
var idplaceEvent = stringIDToTypeID( "placeEvent" );
var desc6 = new ActionDescriptor();
var idID = stringIDToTypeID( "ID" );
desc6.putInteger( idID, 2 );
var idnull = stringIDToTypeID( "null" );
desc6.putPath( idnull, new File( "/Users/fred/Library/Application Support/Adobe/Creative Cloud Libraries/LIBS/0509FD58579F38307F000101_AdobeID/creative_cloud/dcx/da4c9e1a-8bc8-4966-8ae1-c5ae61c21adf/components/b73bfca4-352b-4173-b53f-f3bf96382daf.jpg" ) );
var idlayerName = stringIDToTypeID( "layerName" );
desc6.putString( idlayerName, """RDV_843""" );
var idlinked = stringIDToTypeID( "linked" );
desc6.putBoolean( idlinked, true );
Copy link to clipboard
Copied
b73bfca4-352b-4173-b53f-f3bf96382daf
That sreing looks like a UUID a script mat have generated to ceate a unique name fot that jpeg file. The folder name da4c9e1a-8bc8-4966-8ae1-c5ae61c21adf also look liks a UUID
Copy link to clipboard
Copied
Thanks for your response.... now, can someone from Adobe tell if it even possible or not to do that?????
thx
fred
Copy link to clipboard
Copied
I don’t think it will work because when you place a Library asset a temporary copy is downloaded from the cloud library for the local place. On OSX the download is deep inside of the hidden private folder. The file is deleted on a restart—as @Lumigraphics suggests I don’t think there would be a way to even get the temp file path without downloading first. Here’s the file when I choose Edit Contents from the Layers panel:
This came up in the InDesign forum today:
Copy link to clipboard
Copied
Thanks everyone for your help 🙂
I think that for now since I don't have many assets, I will relink manually each one to the Adobe CC Library.
fred