Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

How to get UIDs of pages containing a given PageItem

$
0
0

Hi,

I have the UID for a PageItem and I'm trying to get a list of the UIDs of the pages which the item is on.

I'm using GetPageUIDs:

 

IDocument* doc = Utils<ILayoutUIUtils>()->GetFrontDocument();

if (doc != nil) {

    IDataBase* db = ::GetDataBase(doc);

    UIDRef itemUidRef = UIDRef(db, itemUid);

    InterfacePtr<IHierarchy> itemHierarchy(itemUidRef, UseDefaultIID());

    if ((itemHierarchy != nil) && (itemHierarchy->GetChildCount() > 0)) {

        UIDList onPageUIDs;

        Utils<IFormFieldUtils>()->GetPageUIDs(itemHierarchy, &onPageUIDs);

        ...

    }

}

 

For every item, I get an empty list in onPageUIDs.

I can't find any examples for the correct way to use this function - am I using it wrong?

 

Thanks

Liz


Viewing all articles
Browse latest Browse all 78596

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>