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

ai script to flip path Text

Community Beginner ,
Jun 29, 2018 Jun 29, 2018

Copy link to clipboard

Copied

Can a script flip text on a path?

With menus it would be Type > Type on a Path > Type on a Path Options > Flip  How to create type on a path in Illustrator​

The closest I can see a script getting to it is using app.executeMenuCommand('textpathtypeOptions') but with thousands of text to flip on circles I'm looking for something more automatic.

A script to put text on a path is easy enough thanks to Muppet Mark: https://forums.adobe.com/thread/983212, but what should the last line to flip it be?

#target illustrator 

 

var doc = app.activeDocument; 

 

doc.defaultFilled = false, doc.defaultStroked = true; 

 

var textPath = doc.pathItems.ellipse( 0, 0, doc.width /2 , doc.height /2 ); 

 

textPath.pathPoints[3].selected = PathPointSelection.ANCHORPOINT; 

 

app.cut(); 

 

doc.selection = null; 

 

app.redraw(); 

 

var tp = doc.textFrames.pathText( doc.pathItems[0], 0, 0, TextOrientation.HORIZONTAL ); 

 

tp.textRange.characterAttributes.size = 20; 

tp.contents = 'Please flip me'; 

tp.textRange.paragraphAttributes.justification = Justification.CENTER;

// tp.flip  // what should this line be??

Thanks!

TOPICS
Scripting

Views

932

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 ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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 ,
Dec 21, 2019 Dec 21, 2019

Copy link to clipboard

Copied

LATEST

Try this:

// your code
// tp.flip  // what should this line be??
var myMatrix = getScaleMatrix(-100,100);
tp.transform(myMatrix);

 

Have fun

😉

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