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

How do I get rid of all the effects and convert all the outlines to paths with fill?

Engaged ,
Oct 25, 2024 Oct 25, 2024

I have a rectangle with a green fill and a crimson stroke, to which I have applied some effects and added a blue stroke.

 

Screenshot_3.png

 

With this script I am trying to do an Expand Appearance and then Expand - to get rid of all Appearence and convert all the stroke to fills. I want to end up with an object consisting of only fills. However, the 'expand' command doesn't seem to work as I end up with an object consisting of only stroked paths.

 

 

 

function expandAppearanceAndStroke(item) {
    try {
        item.selected = true;
        app.executeMenuCommand('expandStyle');
        app.executeMenuCommand('expand');
    } catch (e) {
        // nothing to do
    }
}

 

Screenshot_4.png

Perhaps this is done in some other way?

TOPICS
Scripting
389
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 2 Correct answers

Enthusiast , Oct 27, 2024 Oct 27, 2024

Wrong command name in your code

app.executeMenuCommand('Expand3'); // Show native menu Expand

 

Translate
Enthusiast , Oct 28, 2024 Oct 28, 2024
Translate
Adobe
Enthusiast ,
Oct 27, 2024 Oct 27, 2024

Wrong command name in your code

app.executeMenuCommand('Expand3'); // Show native menu Expand

 

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 ,
Oct 27, 2024 Oct 27, 2024

@Sergey Osokin is there a way to auto submit the menu dialog?

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
Enthusiast ,
Oct 28, 2024 Oct 28, 2024
LATEST
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