🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1785

[CS4 JS] Scripting Indexes

#1785
From: Rick_Quatro
Date: Mon, 26 Jan 2009 21:38
22 lines
1552 bytes
My client is trying to generate an index for a book with thousands of index entries. It takes about 4 hours and then gives an error message about bad characters, or something like that, and then it dies. (Apparently, this is a known issue.)

One solution we are discussing is to create a JS script to collect the index data and create an index story, thus bypassing the built-in generation. To begin experimenting, I tried this:



doc = app.activeDocument; 
index = doc.indexes[0]; 
for (var i=0; i < index.allTopics.length; i++) {

  $.writeln(i+' '+index.allTopics[i].name);

}



The document has about 1,700 index entries in it. When I run this, it takes about 5 seconds for each item to be written to the JS Console. At this rate, it would take over 2 hours to loop through all of the index topics! It seems to me that it shouldn't take that long just to loop through the topics.

Does any one know if there is a problem with the index architecture? Thank you very much.

Rick Quatro
585-659-8267
Technical Details
Message-ID: <59b7ae01.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,6b07b633d95c342d,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Rick_Quatro@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [CS4 JS] Scripting Indexes
Message-ID: <59b7ae01.-1@webcrossing.la2eafNXanI>
Date: Mon, 26 Jan 2009 13:38:31 -0800
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit