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

Create Swatchlegend from Swatches that is being used in group

Community Beginner ,
Oct 19, 2017 Oct 19, 2017

Copy link to clipboard

Copied

I wonder if anybody have any ideas how to generate a Swatch legend of swatches that are used in a selected group?

I found following thread but the solution in this generates a swatch legend based on the swatch palette.

Re: Scripting - Add Swatches

Thanks for help!

TOPICS
Scripting

Views

287

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
Participant ,
Oct 19, 2017 Oct 19, 2017

Copy link to clipboard

Copied

LATEST

If you are doing a batch script best way is to make a temp path with stroke and fill colour of current colour then loop over each colour and doing both:

app.executeMenuCommand("Find Stroke Color menu item");

app.executeMenuCommand("Find Fill Color menu item");

then checking document selection to see if there is more than 1 (or 2 sometimes not too sure why there is sometimes 2 even though it isn't used elsewhere).

If you find its being used: store colour then loop over the list of colours drawing as u go

If your are opening the document and then running the script you could just go to the swatches panel, click the options drop down top right and select unused colours -> drag to bin then run the script afterwards. That way you the only swatches it will be drawing are only the swatches currently in the document

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