🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2374

[JS] :: [CSX] - PageItem Stacking Order

#2374
From: Ben_J.D
Date: Fri, 02 Jan 2009 02:05
27 lines
1960 bytes
Hi folks,

Does any one here have any knowledge and or experience on how indesign handles the stacking order of page items.

I have a simple script which looks like this:

//----------------------------------------------------
//-----Loop through each page then each page item
//----------------------------------------------------
var currentDocument = app.open(File("/c/sample.indd"), false);
var docPages = currentDocument.pages;
var docPageItems;

//Every Page
for(var pagesKey=0;pagesKey<docPages.length;pagesKey++) { 	docPageItems = docPages[pagesKey].pageItems;

	//Every Item of Every page
 	for(var itemKey=0;itemKey<docPageItems.length;itemKey++) 	{ 		alert( "index = "+docPageItems[itemKey].index+", color = "+docPageItems[itemKey].fillColor.name+", id = "+docPageItems[itemKey].id ); 	} } //----------------------------------------------------

The indesign file I am opening can be downloaded here:
 <http://home.exetel.com.au/thunder/img/sample> Folder.zip

I am trying to use the index property of pageItem to determine the proper stacking order--I am trying to sort the page Items from top down.

In This example inDesign reports that the object 'little circle' is underneath 'big Circle' and the index numbers in general do not seem to match how I have placed the objects on top of each other in the document.

Is this the correct way to determine stacking order?
Technical Details
Message-ID: <59b767cf.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,5dfad1e4d169194d,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Ben_J.D@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [JS] :: [CSX] - PageItem Stacking Order
Message-ID: <59b767cf.-1@webcrossing.la2eafNXanI>
Date: Thu, 1 Jan 2009 18:05:32 -0800
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit