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

Accessing the Creative Cloud Libraries objects by script?

Participant ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

I have been scripting Adobe products for a few years, and I am utterly confused how to access the "Creative Cloud Libraries" through script? Are there any docs on how to get references to the objects? I would like to access my "Creative Cloud Libraries" by name, and access all the assets in that "Creative Cloud Libraries"?

Curious to know if anyone has figured out how to access the "Creative Cloud Libraries" through script?

Thanks!

Scott

TOPICS
Scripting

Views

2.9K

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
Valorous Hero ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Try to do some experiments with

Application.openCloudLibraryAssetForEditing (assetURL: File , thumbnailURL: File , assetType: string , options:any): Document

Adobe Illustrator 23 Type Library

For Internal Use.

assetURL: Data Type: File

For Internal use.

thumbnailURL: Data Type: File

For Internal use.

assetType: Data Type: string

For internal use.

options (optional): Data Type: any

For internal use.

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
Participant ,
Nov 05, 2018 Nov 05, 2018

Copy link to clipboard

Copied

Silly-V​ have you messed around with accessing the content in the CC Libraries through script?

We have a shared CC Library "NI Visual Assets" with commonly used icon metaphors for the visual design team. From what I can tell, the icons are saved in the CC Library as a .AI.

What I want to do, is drop each .AI icon metaphor into a new document, then export as .SVG. The only component I am missing is gaining access to the .AI icon by script?

I looked into the app.openCloudLibraryAssetForEditing(myAsset,myAsset) but unsure how to query each .AI file in the "NI Visual Assets" CC library.

Interested in hearing if the community has attempt something like this,

Scott

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 ,
Nov 05, 2018 Nov 05, 2018

Copy link to clipboard

Copied

check this thread by quertyfly, and the link to a previous thread as well

Re: scripting with cc libraries ?

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
Valorous Hero ,
Nov 05, 2018 Nov 05, 2018

Copy link to clipboard

Copied

I remember from some poking around a long time ago, that there is a cc libraries manifest file in some cc prefs folder - in that file you can find the dictionary that qwertyfly was seeking, I believe, which matches your normal human-readable asset names with the generated gibberish-names of the assets.

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
Participant ,
Nov 05, 2018 Nov 05, 2018

Copy link to clipboard

Copied

That is the route I started going down, accessing the users local Libraries folder, searching the "manifest" file in each Library ID folder. Sharing my findings.

CC Library files are stored in user local folder as unique ID's in folder:

C:\Users\srays\AppData\Roaming\Adobe\Creative Cloud Libraries\LIBS\850812535122822F0A490D45_AdobeID\creative_cloud\dcx\

In my case, library "NI Visual Assets" CC Library assets are stored under folder ID:

\161f0ff3-afbe-4bdb-be32-f8812e33bd50

CC Library name "NI Visual Assets" found in "manifest" file:

\161f0ff3-afbe-4bdb-be32-f8812e33bd50\manifest

Will probably locate CC Llibrary "name" by searching for preceeding "type" entry:

  "type": "application/vnd.adobe.library+dcx",

  "name": "NI Visual Assets",

Anyone know the best way to query the current users "C:\Users\srays\AppData\Roaming\Adobe" folder in Extendscript for PC/Mac?

Thanks for pointing me in the right direction!

Scott

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 ,
Nov 05, 2018 Nov 05, 2018

Copy link to clipboard

Copied

try the userData folder

$.writeln(Folder.userData+'/Adobe/Creative Cloud Libraries/LIBS/');

...the appData folder

$.writeln(Folder.appData+'/Adobe/Creative Cloud Libraries/LIBS/');

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 ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

LATEST

Thanks @scottr12917177, that's extremely valuable info ... but after placing something from the library - manually in the dcument - ID v18.4 - link to the library isn't created - it's like I'm creating completely new set of objects in the document... am I doing something wrong? or ID version is at fault?

 

Next question - how can I add something new to the library - through scripting of course?

Can I just edit one of those files and it will synchronise with the cloud?

But looking at the "mess" in the "manifest" file ...

 

I'm talking aboout VB solution - but I could probably create JS script and execute it if needed - Cloud Library API - or go directly with JSON...

 

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
Participant ,
Nov 07, 2018 Nov 07, 2018

Copy link to clipboard

Copied

Thanks CarlosCanto​ and Silly-V​ here is what I came up with to find a client CC Library by name, and return the .ai files.

I will send the array of returned .ai files and run them through a batch exporter I wrote that will generate a folder with sub-folders for each type; png, svg, etc.

function getLibraryFiles( libName ){

    var fldrs_localCClibraries =  Folder( Folder.userData+'/Adobe/Creative Cloud Libraries/LIBS/'+app.userGUID.replace('@AdobeID','') +'_AdobeID/creative_cloud/dcx/').getFiles();

   

    for( var g = 0; g < fldrs_localCClibraries.length; g++) {

        var localLibraryFiles = fldrs_localCClibraries.getFiles();

        var localLibraryComponentFiles = null;

           

        // does the manifest file in this library folder contain the library name I'm looking for

        for( var h = 0; h < localLibraryFiles.length; h++) {

            // locate manifest file in library folder

            if( localLibraryFiles.displayName == 'manifest' ){

               

                localLibraryFiles.open('r');  // open manifest file

                var txt_manifest = localLibraryFiles.read(); // read all contents in manifest file

                localLibraryFiles.close(); // close the manifest file

               

                if( txt_manifest.indexOf(libName) != -1 ) { // does manifest file contain library name user is looking for

                      

                    var thisLibraryFolder = fldrs_localCClibraries.getFiles();

                   

                    for( var t = 0; t < thisLibraryFolder.length; t++) { // find component folder in library

                        if( thisLibraryFolder.name == 'components' ) {

                            return thisLibraryFolder.getFiles( '*.ai' );  // get all .ai files in component folder

                        }

                    } // for all files in library folder

                }

            }

        } // for all files in a library folder

    } // for all library folders

    return null;

}

//end

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 ,
Nov 07, 2018 Nov 07, 2018

Copy link to clipboard

Copied

Hi scott, haven't tried it yet, but thanks for sharing

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
Valorous Hero ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

Yes, thank you!

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