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

GetItemsOnPage including Masters

Guide ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

Hello,

I can use spread->GetItemsOnPage to get all the none master page items. I would like to also get all the master page items for a given page.

Thanks.

P.

TOPICS
SDK

Views

661

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

correct answers 1 Correct answer

Enthusiast , Feb 28, 2014 Feb 28, 2014

Hi,

no.

Use the IMasterPage interface of the kPageBoss of the page with pageUID. From this interface you get the masterSpreadUID and masterSpreadPageIndex. Use the ISpread interface of the boss with the masterSpreadUID and call GetItemsOnPage( masterSpreadPageIndex, ... ).

Markus

Votes

Translate

Translate
Enthusiast ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

Hello Pickory,

you must get the master page/spread of the page/spread and then call GetItemsOnPage. The page items are not in the same hierarchy.

Markus

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 ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

Hi,

Thank you for your reply.

Would this be correct?

UIDRef masterSpreadUIDRef(db, masterSpreadList->GetNthMasterSpreadUID(masterSpreadIndex) );

InterfacePtr<ISpread> spread(masterSpreadUIDRef, UseDefaultIID());

if ( spread )

{

          UIDList masterItemList;

          int32 numPages = spread->GetNumPages ( );

          for ( int32 j = 0; j < numPages; j++ )

          {

                    if ( spread->GetNthPageUID ( j ) == pageUID ) // found our page

                              spread->GetItemsOnPage(j, &masterItemList, kFalse, kFalse );

Thank.

P.

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
Enthusiast ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

Hi,

no.

Use the IMasterPage interface of the kPageBoss of the page with pageUID. From this interface you get the masterSpreadUID and masterSpreadPageIndex. Use the ISpread interface of the boss with the masterSpreadUID and call GetItemsOnPage( masterSpreadPageIndex, ... ).

Markus

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 ,
Feb 28, 2014 Feb 28, 2014

Copy link to clipboard

Copied

LATEST

Brilliant! Thank you.

P.

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