3

I'd like to ask how can I automatically number dots in illustrator. I used the stroke key and dashed lines to make the dots, and I have no problem applying them to a path.

The problem I have is numbering them. I tried to follow these instructions and uploaded this script.

How to add numbers to Adobe Illustrator anchor points?

but it only numbers the first dot. When I try to run it again, it numbers the same dot, with a different number. I'd like for it to number all the dots i've created along that path.

How can i get it to work perfectly?

Thank you.

5
  • Hi. Welcome to GDSE. Have you tried expanding the path to individual shapes/objects? I think the script numbers objects, not anchors.
    – Billy Kerr
    Oct 25, 2019 at 6:46
  • Hello. Take a look at Carlos Canto's answer. He tells how to separate each anchor in individual objects. graphicdesign.stackexchange.com/questions/50559/…
    – LeoNas
    Oct 25, 2019 at 11:46
  • @BillyKerr I want to number the dots that are formed when you take a path, and create dots out of it with the stroke tool.
    – tif333
    Oct 25, 2019 at 12:28
  • @LeoNas So if i use this tool, i will be able to turn those dots into objects, and afterwards apply that script to make them numbered?
    – tif333
    Oct 25, 2019 at 12:29
  • I tested here and it worked fine.
    – LeoNas
    Oct 25, 2019 at 17:57

2 Answers 2

2

Perhaps I'm a gluten for punishment, but I'd do this simply with additional fills/strokes in the Appearance Panel... and the some transform Effects. This would tie the number to the circle.. and then I'd position them manually.

  • Select the text with the Selection Tool (Black Arrow)
  • Add a new Fill in the Appearance Panel
  • Highlight that new fill and...
  • Choose Effect > Convert to Shape > Ellipse from the menu and adjust (size)
  • Then choose Effect > Distort & Transform > Transform from the menu and adjust the Move fields to position the circle where you want in relation to the number.

-- Repeat all the above for the stroke (or merely copy the effects from the fill tot he stroke)

enter image description here

enter image description here

Then all you need do is change the type (number). If the circle is positioned poorly, you can always readjust the fill and stroke to better accommodate the text.

enter image description here

Drag one of the text objects to the Graphic Styles panel and in the future, if you want the same configuration, you merely need to select a text object and click the Graphic Style in that panel.

enter image description here

3
  • your method worked, but it may not be ideal for large amounts of work. I took screenshots for you, can't find out how to upload an image. Been at it for a while now.
    – tif333
    Oct 26, 2019 at 8:40
  • @tif333 You can’t add images to comments; edit the question and add them there as an update instead. Oct 27, 2019 at 7:56
  • Your animation is very fast :-( +1.
    – Sebastiano
    Oct 29, 2019 at 22:59
0

Bringing the comments to life the Carlos Cantos's tips + the use of the Script to number the objects(anchors in this case)...

Here are the steps to get what you want, I think.

The code I'm using here. Create a simple txt file. Place the code and save it as .jsx.

var document = app.activeDocument;           //Use the current open Ai File
var selected = document.selection;           //Use the current selection in Ai

for (var i = 0; i < selected.length; i++) {  //Iterate over every selected object
var text = document.textFrames.add();    //Add a new text object
text.contents = i + 1;                   //Set the corresponding number text
text.top = selected[i].top - 10;         //Position the text object underneath
text.left = selected[i].left;
}

Follow the image steps:

enter image description here

2
  • Thank you for the replies. Leo, i tried your method, the script still didn't work. Scott, your method works, but i would have to apply the numbers across a large image, and i'd never finish my project. I took screenshots and i don't know how to upload them in the comments. I googled it and I can't find the image uploader so that i can link to them.
    – tif333
    Oct 26, 2019 at 8:39
  • I just upload the script I used. Tested several times.
    – LeoNas
    Oct 28, 2019 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.