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

CC Libraries in javascript

Community Beginner ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

Hi there,

 

I am trying to grab swatch colors created for our company in our libraries in javascript. We have several CC Libraries on file. so I am trying to grab the name of the library. Then we have groups for logos, colors, etc. so I am trying to get into a named group, then that asset color name.

I haven't' got past

    var brandLib = app.libraries.itemByName("Library Name");
    var brandLib.assets.itemByName("Color Name");
    
    if (!brandLib.isValid || !brandLib.assets.length) {
        alert("No Library Found");
        exit();
    }
    else {
        alert("Add Item");
    }

 when I run this nothing happens. I am following what others said to try, but it is not working.

 

any ideas?

TOPICS
Scripting

Views

382

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 ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

Hi kyleo,

no wonder that you couldn't get anything.

app.libraries is pointing at opened InDesign library files ( *.indl ) and not to CC Library libraries.

There is no DOM object that can reach assets inside CC Libraries.

 

Regards,
Uwe Laubender

( ACP )

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 ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

okay, that makes sense why everything I have tried is not working. is there a way I can link to the online library on our company account to 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
Community Expert ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

LATEST

Sorry. As I already said: I see no way.*

If you find something somewhere else, please come back and share the trick.

 

* There are some methods with the application in InDesign 2020 that are looking promising, but if you see into the details what to provide as argument you will be on your own. One example:

 

app.openCloudAssetForEdit()

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Application.html#d1e42173__d1e47549

 

Thanks,
Uwe Laubender

( ACP )

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