Thread View: adobe.framemaker.sgml
3 messages
3 total messages
Started by alma
Tue, 23 Sep 2008 14:41
FDK 7.2 : Get the ID of the object before MarkerID
Author: alma
Date: Tue, 23 Sep 2008 14:41
Date: Tue, 23 Sep 2008 14:41
11 lines
819 bytes
819 bytes
Hi, I have a marker ID and i want to get the ID of the object located before him. ex:FDK 7.2$ In this example, the marker is located at $. I want to get the id of the object that has the text FDK 7.2. Is it possible? How can i make that? Thanks, Alexandre
Re: FDK 7.2 : Get the ID of the object before MarkerID
Author: Russ Ward
Date: Tue, 23 Sep 2008 16:14
Date: Tue, 23 Sep 2008 16:14
42 lines
1623 bytes
1623 bytes
Hi Alexandre, Interesting question. Do you want the ID of the parent paragraph? I think you should be able to get that by querying FP_TextLoc property of the marker. Something like: F_TextLocT tl; F_ObjHandleT pgfId; ... tl = F_ApiGetId(docId, markerId, FP_TextLoc); /* then... */ pgfId = tl.objId /* or just use tl.objId as is */ ... If you are looking for the text itself, then you probably need to do something like: F_TextItemsT textitems; F_TextLocT tl; F_TextRangeT tr; StringT text; /* find the paragraph ID */ tl = F_ApiGetId(docId, markerId, FP_TextLoc); /* get the text items up to the marker */ tr.beg.objId = tr.end.objId = tl.objId; tr.beg.offset = 0; tr.end.offset = tl.offset; textitems = F_ApiGetTextForRange(docId, &tr, FTI_String); /* get the last text string before the marker from the textitems */ text = F_StrCopyString(textitems.val[textitems.len - 1].u.sdata); ... Note that I didn't test any of this, just some ideas. Russ
Re: FDK 7.2 : Get the ID of the object before MarkerID
Author: alma
Date: Thu, 25 Sep 2008 09:22
Date: Thu, 25 Sep 2008 09:22
4 lines
712 bytes
712 bytes
Hi Russ, Thanks for your help, Alexandre
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads