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

Extendscript: Place asset from Shared Adobe CC library

Community Beginner ,
Feb 16, 2021 Feb 16, 2021

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:

 
I tried to link to the local copy of the asset:
var assetFile = new File('/Users/xxx/Library/Application Support/Adobe/Creative Cloud Libraries/LIBS/xxx_AdobeID/creative_cloud/xxx/xxx-c5ae61c21adf/components/asset.jpg')
 
.. but no succes 😞

Thanks,

fred

 

TOPICS
Actions and scripting

Views

425

Translate

Translate

Report

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
Adobe
Community Expert ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

image.png

 

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')

JJMack

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

This is not likely to work. You'll need to download the asset first.

Votes

Translate

Translate

Report

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 ,
Feb 22, 2021 Feb 22, 2021

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 );

Votes

Translate

Translate

Report

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 Expert ,
Feb 22, 2021 Feb 22, 2021

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

JJMack

Votes

Translate

Translate

Report

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 ,
Feb 25, 2021 Feb 25, 2021

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

Votes

Translate

Translate

Report

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 Expert ,
Feb 25, 2021 Feb 25, 2021

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:

 

Screen Shot 29.png

 

This came up in the InDesign forum today:

https://community.adobe.com/t5/indesign/script-to-relink-all-image-from-local-to-cc-library/td-p/118...

 

Votes

Translate

Translate

Report

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 ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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