Is there a way to re-number values in a text box, or import a list of numbers to text box?

New Here ,
Nov 28, 2020

Copy link to clipboard

Copied

Screen Shot 2020-11-28 at 4.16.41 PM.png

I'm making a diagram of pattern peices that must be placed down in a numbered order, and often need to add a peice or redo the order of placement.  and every time I have to re number the entire file.  I have to click on every single text box and manually change everything.  Is there a way to make it so that when one value on an artboard changes, the rest do in turn, like in Excel?  Or a way to link excel and Illustraor? 

 

I personally use Illustrator but if this is possible for any of the Creative Suite programs, I'll happily switch over to another program once I am at the numbering stage.

 

Thanks in advance! 

TOPICS
Feature request, How to, Scripting, Type

Views

86

Likes

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

Is there a way to re-number values in a text box, or import a list of numbers to text box?

New Here ,
Nov 28, 2020

Copy link to clipboard

Copied

Screen Shot 2020-11-28 at 4.16.41 PM.png

I'm making a diagram of pattern peices that must be placed down in a numbered order, and often need to add a peice or redo the order of placement.  and every time I have to re number the entire file.  I have to click on every single text box and manually change everything.  Is there a way to make it so that when one value on an artboard changes, the rest do in turn, like in Excel?  Or a way to link excel and Illustraor? 

 

I personally use Illustrator but if this is possible for any of the Creative Suite programs, I'll happily switch over to another program once I am at the numbering stage.

 

Thanks in advance! 

TOPICS
Feature request, How to, Scripting, Type

Views

87

Likes

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
Nov 28, 2020 0
Adobe Community Professional ,
Nov 28, 2020

Copy link to clipboard

Copied

You might want to try importing the Illustrator art into InDesign and using threaded text frames in that program for the numbers. To learn how to do this see: https://helpx.adobe.com/lu_en/indesign/using/threading-text.html.

Likes

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
Reply
Loading...
Nov 28, 2020 1
Engaged ,
Nov 28, 2020

Copy link to clipboard

Copied

Each time this is run, it will increase every number by one. 

 

var doc = app.activeDocument;
var frames = doc.textFrames;
for (var i = 0; i < frames.length; i++) {
  frames[i].contents = Number(frames[i].contents) + 1;
}

 

 

Likes

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
Reply
Loading...
Nov 28, 2020 1
Engaged ,
Nov 29, 2020

Copy link to clipboard

Copied

Alternatively, this will increase every number higher than the selected number by one.

 

var frames = app.activeDocument.textFrames;
var x = 0;
for (var i = 0; i < frames.length; i++) {
  if (selection[0] == frames[i]) {
    x = i;
    break;
  }
}
for (var i = 0; i < frames.length; i++) {
  if ((Number(frames[i].contents) >= Number(frames[x].contents)) && 
       frames[i] != frames[x]) {
    frames[i].contents = Number(frames[i].contents) + 1;
  }
}

 

 

Likes

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
Reply
Loading...
Nov 29, 2020 2
Resources