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

Script for moving elements to separate layers based on their appearance

New Here ,
Mar 08, 2024 Mar 08, 2024

Copy link to clipboard

Copied

Hello everybody!

 

I’m working a lot with architectural plans that were created in CAD programs and get delivered to me as PDFs with all the vector information in one flat layer. In order to work with them I have to tediously select all elements by stroke color, stroke width and fill color and move them to separate layers by hand. Since this can take some time I was looking for a script that could help me with that. I’ve found some scripts in this forum which came close but didn’t quite get there.

 

As a first step it would be helpful if I could select one element and the script selects all other elements with the same stroke color, stroke width and fill color and moves them to a new layer. As the next step it would be very useful if I can just open a file, run the script and all elements with the same appearance get separated in individual layers.

 

Since I have no skills in scripting I’d like to ask the community if anybody has heard of such a script or plugin or would know how to go about scripting something like that. Many thanks in advance!

TOPICS
How-to , Scripting , Third party plugins

Views

284

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
Community Expert ,
Mar 08, 2024 Mar 08, 2024

Copy link to clipboard

Copied

It may be possible with an action or a script.

 

Can you share a sample Illustrator file with some further instructions?

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 ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

Hi! Thanks for you answer. I’ve included a sample file that shows how the plans usually get delivered.

 

It would be great if the script can somehow move elements of the same appearance onto layers of their own. For example the blue text has no stroke and a fill of 0/0/153. All elements with that appearance would be on a separate layer. The black text (no stroke, fill color 0/0/0) would then be on a different layer etc.

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
Community Expert ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

LATEST

Thanks for providing the sample file.

 

Yes, it's definetely possible with an action and it may be even faster than a script *if* there are always the same conditions in your files.

 

Are you familiar with creating actions?

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