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

Expand pointText (textFrameItem) using ExtendScript

Community Beginner ,
Apr 07, 2022 Apr 07, 2022

Hi everyone,

Is there a way to expand a text item on Illustrator through ExtendScript?

To give an example, consider this pointText on an Illustrator Artboard:

JohnSamuelJoy_0-1649330705761.png

If I expand it (found in the Object tab->Expand), the text "explodes" into a group, so to speak, of text letters of CompoundPaths

JohnSamuelJoy_1-1649330838272.png

I'd like to know if there is any way I can do this expanding feature through ExtendScript.

 

Regards,

John Joy

 

 

TOPICS
Scripting
728
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

Community Expert , Apr 07, 2022 Apr 07, 2022

or perhaps

 

textRef.createOutline()
Translate
Community Expert , Apr 11, 2022 Apr 11, 2022

for pathItems you'll need

app.executeMenuCommand('OffsetPath v22');

 

but pathItems must be selected first

Translate
Adobe
Community Expert ,
Apr 07, 2022 Apr 07, 2022

Hi @John Samuel Joy

app.executeMenuCommand('outline');

will outline the selected text frame.

- Mark 

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 ,
Apr 07, 2022 Apr 07, 2022

or perhaps

 

textRef.createOutline()
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 ,
Apr 07, 2022 Apr 07, 2022

Haha! Yes. Much better. Forgot that in the heat of the moment. Doh!

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 ,
Apr 07, 2022 Apr 07, 2022

😆😆 it happens.

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 Beginner ,
Apr 11, 2022 Apr 11, 2022

THANKS A BUNCH!

 

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 Beginner ,
Apr 11, 2022 Apr 11, 2022

As a follow up, how do I expand a line inserted via Script (which is really a PathItem)?

I've tried to use createOutline for the same but it pops up as an error.

JohnSamuelJoy_0-1649662954647.png

 

Any wisdom here?
Thanks again!

 

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 ,
Apr 11, 2022 Apr 11, 2022
LATEST

for pathItems you'll need

app.executeMenuCommand('OffsetPath v22');

 

but pathItems must be selected first

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