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

I'd like to get the correct swatch.

New Here ,
Jul 27, 2018 Jul 27, 2018

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
571
Translate
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

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

Salut !

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

    swatch.name = "toto";

de elleere

Translate
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

This is what I wanted.


Thank you my wizard!

Translate
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
LATEST

Hello, René!

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

Translate
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