• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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 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 , Scripting , Type

Views

189

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
Adobe
Community Expert ,
Nov 28, 2020 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.

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
Guide ,
Nov 28, 2020 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;
}

 

 

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
Guide ,
Nov 29, 2020 Nov 29, 2020

Copy link to clipboard

Copied

LATEST

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;
  }
}

 

 

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