[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

RE: Updating XRefs



Title: Message
Thanks to Rick Quatro for solving this one... the code should have been
 
myError = F_ApiUpdateXRefs(docId, FF_XRUI_FORCE_UPDATE | FF_XRUI_EVERYTHING);
 
and then all is fine.
 
Thanks again Rick!
 
Sue
-----Original Message-----
From: Mitchell, Sue [mailto:Sue.Mitchell@cognos.com]
Sent: Friday, October 19, 2001 2:47 PM
To: 'Framers (framers@omsys.com)'
Subject: Updating XRefs

Has anyone ever had experience using F_ApiUpdateXRefs who might know why it is not working for me? I am trying to change all instances of Heading & Page xRefs to Jump and while the format of the xref does change when I try to update them through the API it doesn't work, they are still displayed as <$paratext>  <$pagenum>. If I look at the xref in the document it does indicate that it is now a Jump xref and if I do the update manually in Frame they do change. Can anyone offer any advice here? This is the core of the code that is not working:

headingAndPageId = F_ApiGetNamedObject(docId, FO_XRefFmt, (StringT)"Heading & Page");
jumpId = F_ApiGetNamedObject(docId, FO_XRefFmt, (StringT)"Jump");

xRefId = F_ApiGetId(FV_SessionId, docId, FP_FirstXRefInDoc);
//Loop through all markers in the document
                                       
while(xRefId){
        //Get the id of the marker type for each one
        xRefTypeId = F_ApiGetId(docId, xRefId, FP_XRefFmt);
        //if it is a Heading & Page xref then change to Jump
        if (xRefTypeId == headingAndPageId){
                F_ApiSetId(docId, xRefId, FP_XRefFmt, jumpId);
                myError = F_ApiUpdateXRefs(docId, FF_XRUI_FORCE_UPDATE);               
        }
        xRefId = F_ApiGetId(docId, xRefId, FP_NextXRefInDoc);
}


PS I also tried F_ApiRedisplay and F_ApiReformat after F_ApiUpdateXRefs and that didn't work either and myError returns 0 which is FE_Success! Saving and closing and reopening the document didn't work either.

Sue Mitchell
------------------------------------------------
Writing Support Specialist
Cognos Inc
613-738-1338 x5461

This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate, or distribute it; do not open any attachments, delete it immediately from your system and notify the sender by e-mail promptly that you have done so.  Thank You.

This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate, or distribute it; do not open any attachments, delete it immediately from your system and notify the sender by e-mail promptly that you have done so. Thank You.