• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

How to get align to path option value using extendscript?

Explorer ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

Hi,

I need to get align to path option value using extendscript.

Arunkumar25715058ufpl_0-1721739535534.png

 

Please help.

 

 

TOPICS
How-to , Scripting

Views

159

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

correct answers 1 Correct answer

Community Expert , Jul 24, 2024 Jul 24, 2024

There may be a hacky way to do it, such as something like this (via script):

(a) duplicate the textFrame

(b) set the duplicate's textFont, size, baselineShift and contents each to a pre-defined value, eg. contents might be set to "X" and textFont would be set to a known universally-available font.

(c) replace the textFrame's path with a straight horizontal line.

(d) convert the "X" textFrame to outlines

(e) compare the geometricBounds of the outlined X with the geometricBounds of a known (pre-re

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

Hi @Arunkumar25715058ufpl, as far as I can see, that property is not exposed to Extendscript API. Another option might be using an action to set it, and executing the action via ExtendScript. Do you think that would work in your case?

- Mark

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
Explorer ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

Hi @m1b, there is no way to get the value using extendscript. only set the value using extendscript. is it right?

 

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 ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

LATEST

There may be a hacky way to do it, such as something like this (via script):

(a) duplicate the textFrame

(b) set the duplicate's textFont, size, baselineShift and contents each to a pre-defined value, eg. contents might be set to "X" and textFont would be set to a known universally-available font.

(c) replace the textFrame's path with a straight horizontal line.

(d) convert the "X" textFrame to outlines

(e) compare the geometricBounds of the outlined X with the geometricBounds of a known (pre-recorded) bounds of X at the different "Align to path" options and decide which is in use.

(f) delete the duplicate textframe

 

I would put this in a function called getAlignToPathSetting. It would be a hack, same principle as the one I wrote here, but I think it would work.

- Mark

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