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

Still impossible to remove() or delete a brush using a script ?

Engaged ,
Feb 18, 2022 Feb 18, 2022

As mentioned, it is not possible to remove() or delete a brush using a script

https://community.adobe.com/t5/illustrator-discussions/is-it-possible-to-remove-or-delete-a-brush-us...
2 years later it is still impossible?

TOPICS
Scripting
491
Translate
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

correct answers 1 Correct answer

Guide , Feb 18, 2022 Feb 18, 2022

Looking at the refrence, a brush doesn't have a remove() function.  So the answer is:  Yes, not possible.  

Translate
Adobe
Guide ,
Feb 18, 2022 Feb 18, 2022

Looking at the refrence, a brush doesn't have a remove() function.  So the answer is:  Yes, not possible.  

Translate
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
Mentor ,
Feb 18, 2022 Feb 18, 2022

I'm not a scripter so don't shoot me, but can you convert it to something else - expand, or outline - and then delete that?

Translate
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 ,
Feb 18, 2022 Feb 18, 2022

I think the OP is referring to deleting brushes from the Brushes palette.  

Translate
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
Mentor ,
Feb 18, 2022 Feb 18, 2022

Ah ha... shot anyway...

Translate
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 ,
Feb 19, 2022 Feb 19, 2022

do you want to remove one brush in particular? the thread linked does mention you can remove all unused brushes with an action. Is that not an option for your workflow?

Translate
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
Engaged ,
Feb 22, 2022 Feb 22, 2022

Actually i want to check if all active documents items, with a specific stroke swatch ( CutContour), have a brush other than the default !

Translate
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 ,
Feb 22, 2022 Feb 22, 2022

So you want to assign a basic stroke to all the elements that have that stroke color?

Translate
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
Engaged ,
Feb 22, 2022 Feb 22, 2022

Yes!

Translate
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
Valorous Hero ,
Feb 22, 2022 Feb 22, 2022
LATEST

I tried some way to remove a brush from a path item, and guess what, trying to apply a default brush failed because the "[Basic]" brush is in the UI but it is not in the document!
However, you can still record the action with the flyout menu of the brushes panel - "Remove Brush Stroke".

SillyV_0-1645566584983.pngexpand image

Now it's easy to do what you wish using this code:

  var doc = app.activeDocument;
  var s = doc.selection[0];
  app.doScript("RemoveStroke", "Test");

 

Translate
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