I'd like to get the correct swatch.

New Here ,
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?

Salut !

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

    swatch.name = "toto";

de elleere

TOPICS
Scripting

Views

251

Likes

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

I'd like to get the correct swatch.

New Here ,
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?

Salut !

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

    swatch.name = "toto";

de elleere

TOPICS
Scripting

Views

252

Likes

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
Jul 27, 2018 0
Enthusiast ,
Jul 27, 2018

Copy link to clipboard

Copied

Salut !

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

    swatch.name = "toto";

de elleere

Likes

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
Reply
Loading...
Jul 27, 2018 1
New Here ,
Jul 29, 2018

Copy link to clipboard

Copied

This is what I wanted.


Thank you my wizard!

Likes

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
Reply
Loading...
Jul 29, 2018 0
Community Beginner ,
Jun 21, 2020

Copy link to clipboard

Copied

Hello, René!

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

Likes

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
Reply
Loading...
Jun 21, 2020 0
Resources