Skip to main content
Participant
June 19, 2024
Answered

script or workaround for changing text to right-justified without moving the text.

  • June 19, 2024
  • 1 reply
  • 598 views

I'm working on a map with hundreds of labels, each associated with a point location, which are small circles.    Labels are positioned to the left of the circles, with the last letter touching the circle.  Client needs  to be be able to edit the text and/or it's point size.  Since the text is anchored on the left, this shifts the text away from or on top of its associated circle.  Result is utter confusion, labels losing their visual link to their circles.

These circles and labels are created in GIS software, which will only create left-justified text.  I export the GIS circles & labels to svg file and then open that in Illsutrator.  

So I'm looking for a workaround or script to reverse the justification en masse.   Process or script would be:

 

User manually selects some or all of the type on a single layer.

 

For each selected text object:
    if object is left-justified:
        get length of text
        change to right justified # (shifts text to the left)
        move text to the right by its length

 

Any help or suggestions are appreciated

 

This topic has been closed for replies.
Correct answer hhas01

You don’t even need a script:

 

  1. Select > All
  2. Type > Convert to Area Type
  3. Ctrl-Shift R to right-align
  4. Type > Convert to Point Type

1 reply

Kurt Gold
Community Expert
Community Expert
June 19, 2024
hhas01Correct answer
Inspiring
June 19, 2024

You don’t even need a script:

 

  1. Select > All
  2. Type > Convert to Area Type
  3. Ctrl-Shift R to right-align
  4. Type > Convert to Point Type
Participant
June 19, 2024
Thank you so much! I'll try this today.