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

Order script

Explorer ,
Oct 04, 2020 Oct 04, 2020

Copy link to clipboard

Copied

Hi. I need a script to group same color paths to same groups and after, combine/join paths in this groups into objects.

 

What do you think?

P.S Sorry I am not good at English.

test_script [преобразованный]-01.jpg

TOPICS
Scripting

Views

410

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
Explorer ,
Oct 04, 2020 Oct 04, 2020

Copy link to clipboard

Copied

About "group same color paths to same groups" I mean situation like this

test_script [преобразованный]-02.jpg

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
Guide ,
Oct 04, 2020 Oct 04, 2020

Copy link to clipboard

Copied

This is a primitive way of grouping path items with the same stroke color.

var paths = app.activeDocument.pathItems;
for (var i = 0; i < paths.length; i++) {
  if (paths[i].parent != "GroupItem") {
    paths[i].selected = true;
    app.executeMenuCommand("Find Stroke Color menu item");
    app.executeMenuCommand("group");
    app.executeMenuCommand("deselectall");
  }
}

I'm afraid I don't understand the second part of your question.

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 ,
Oct 05, 2020 Oct 05, 2020

Copy link to clipboard

Copied

About second part.

I can't fill the surfaces because they are not surfaces. They are a lot of paths. I need to join (Like Ctrl+j) this paths into surfaces.

 

For example cube.

On my picture you can see the cube like 3 surfaces (like surface x, surface y, surface z). But this surfaces are consist from separate paths. Could I combine it by 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
Explorer ,
Oct 05, 2020 Oct 05, 2020

Copy link to clipboard

Copied

Be_Illustrator_0-1601900126338.png

 

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
Guide ,
Oct 05, 2020 Oct 05, 2020

Copy link to clipboard

Copied

I cannot help you, but I will suggest Hiroyuki Sato's script Join Reasonably.

http://shspage.com/aijs/en/#join_reasonably

This will work on simple 2D shapes, but will produce extra lines on 2D representations of 3D objects.

Untitled01.png

Untitled02.png

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
Advocate ,
Oct 06, 2020 Oct 06, 2020

Copy link to clipboard

Copied

LATEST

Salut!

ctrl+j puis Outil K (pot de peinture dynamique)

renél80416020_2-1601972827078.png

 

 

 

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