Copy link to clipboard
Copied
Hi,
I need to get align to path option value using extendscript.
Please help.
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
...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
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?
Copy link to clipboard
Copied
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