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

How to find any pathItem has Brush applied or not using Extendscript

Community Beginner ,
Sep 13, 2023 Sep 13, 2023

Copy link to clipboard

Copied

Hi,

I want to check any pathIem has brushes Applied or not. Can you please provide me the script for the same

TOPICS
Bug , Experiment , Feature request , How-to , Import and export , Performance , Print and publish , Scripting , SDK , Third party plugins , Tools

Views

87

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
Engaged ,
Sep 13, 2023 Sep 13, 2023

Copy link to clipboard

Copied

As far as I know, in Illustrator scripts we can apply a brush to an path, but we can't check if the brush has been applied to the path. Maybe someone found a solution.

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 ,
Sep 13, 2023 Sep 13, 2023

Copy link to clipboard

Copied

LATEST

Sorry for this long story: I wrote a function that determines if a dashed stroke has "align to ends and corners" set. This isn't exposed to the scripting API, so I had to do a hack: the script duplicates the item, alter the path points so that there are only two path points, a specific distance apart, sets a specific stroke weight and dash pattern and expands the stroke, then checks how many path items are made—if two then not aligned; if three, then aligned.

 

Your case *might* be amenable to solving in a similar way: by expanding a duplicate, simplifying the points of the path, outlining the stroke, and measuring the number of pathPoints created against a known value. There would be a bit of experimentation required to make this work (if it even will) because you will have to test with different brushes to see if you get false positives. Anyway, just a thought. Like @Sergey Osokin, I don't know any easy way.

- Mark

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