Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 9:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: number of pages in a chapter
PostPosted: July 26th, 2011, 2:10 pm 
Offline

Joined: May 25th, 2005, 10:40 am
Posts: 17
Opus: Opus Pro 7
OS: Windows 7 - macOS Lion
System: imac
Hi,

is there a script command or code to get the total number of pages in a chapter?

thanks


Top
 Profile  
 
 Post subject: Re: number of pages in a chapter
PostPosted: July 26th, 2011, 8:05 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Admin -- this question belongs in the Advanced category.

Tempo,

Once you have the Chapter object name, e.g. Chap04
Code:
var countPages = Chap04.GetNumberChildren()  //returns the number of children that are directly under chapter in the hierarchy (so, number of pages)

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: number of pages in a chapter
PostPosted: July 26th, 2011, 8:43 pm 
Offline

Joined: May 25th, 2005, 10:40 am
Posts: 17
Opus: Opus Pro 7
OS: Windows 7 - macOS Lion
System: imac
Lar_123 wrote:
Once you have the Chapter object name, e.g. Chap04
Code:
var countPages = Chap04.GetNumberChildren()  //returns the number of children that are directly under chapter in the hierarchy (so, number of pages)


sorry but i receive this error message

Undefined identifier 'Chap04'


Top
 Profile  
 
 Post subject: Re: number of pages in a chapter
PostPosted: July 27th, 2011, 3:46 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
sorry but i receive this error message

Undefined identifier 'Chap04'
You must look in your Organizer Tree within Opus editor/workspace to know what your Chapter names are.

I only gave an example. ("e.g." means 'for example')


You can take a screen shot of your Opus workspace to help us identify the objects you are working with. But, it is fairly straight-forward... use the names you have in your own Pub's Organizer Tree.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: number of pages in a chapter
PostPosted: July 27th, 2011, 6:56 am 
Offline

Joined: May 25th, 2005, 10:40 am
Posts: 17
Opus: Opus Pro 7
OS: Windows 7 - macOS Lion
System: imac
ok, i found it.....

the code is

Code:
var NumPagesInChapter = this.GetParent().GetNumberChildren();


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group