Skip to main content
Participant
April 3, 2025
Answered

Using Javascript to add text to a circular path

  • April 3, 2025
  • 1 reply
  • 354 views

I've tried arguing with chatGPT about this to no avail.  Does anyone know if it is possible to add text to an elliptical path in a Javascript function?

Correct answer jduncan

Try this out.

var doc = app.activeDocument;
var ellipse = doc.pathItems.ellipse(0, 0, 360, 360);
var textFrame = doc.textFrames.pathText(ellipse);
textFrame.contents = "This is text on a path!";

 

1 reply

jduncan
Community Expert
jduncanCommunity ExpertCorrect answer
Community Expert
April 3, 2025

Try this out.

var doc = app.activeDocument;
var ellipse = doc.pathItems.ellipse(0, 0, 360, 360);
var textFrame = doc.textFrames.pathText(ellipse);
textFrame.contents = "This is text on a path!";

 

PercypawsAuthor
Participant
April 3, 2025

Way better that the  bots!!!

Seems to work, and I can hone it for my Nightingale chart!!

Cheers muchly.

 

jduncan
Community Expert
Community Expert
April 3, 2025

Great to hear. Can you please mark the answer as correct when you get a chance? Let us know if you need any more help.