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

I'd like to get the correct swatch.

New Here ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

There's a swatch that named "6" in the swatch list.

And i'd like to rename or remove this swatch.

I tryed these code already.

But these dindn't work well.

These got sixth swatch in the list.

var swObj = doc.swatches["6"];

var swObj = doc.swatches[(6).toString()];

Off course , I could get  other swatches that have usually name.

Is there a way to get swatch object that named as number character except  by renaming swatches before do script?

TOPICS
Scripting

Views

422

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

correct answers 1 Correct answer

Advocate , Jul 27, 2018 Jul 27, 2018

Salut !

var swatch = documents[0].swatches.getByName("6");

    swatch.name = "toto";

de elleere

Votes

Translate

Translate
Adobe
Advocate ,
Jul 27, 2018 Jul 27, 2018

Copy link to clipboard

Copied

Salut !

var swatch = documents[0].swatches.getByName("6");

    swatch.name = "toto";

de elleere

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
New Here ,
Jul 29, 2018 Jul 29, 2018

Copy link to clipboard

Copied

This is what I wanted.


Thank you my wizard!

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
Explorer ,
Jun 21, 2020 Jun 21, 2020

Copy link to clipboard

Copied

LATEST

Hello, René!

How would you activate the Global option of every swatch using a Script?

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