How to get a paragraph that contains the string selected in FDK?

Hello

I am writing a program that extracts content of the paragraph that contains a selection string. This program runs in the interaction point menu. When the user click on the menu item. The process as follows:
1. find a chain on a document, for example: F_ApiFind ("ABC").
2. the F_ApiFind ("ABC") API returns the F_TextRangeT structure.
3. the string "ABC" has been highlighted on the document.

Here's my question:
How can I write code to locate an object ID paragraph (pgfId) that contains the string (or object) 'ABC '?.
As the 'ABC' object belongs to the current paragraph, how can I get section ID (pgfId) and then get the content of the entire paragraph
without a loop through FP_FirstFlowInDoc, FP_FirstTextFrameInFlow, FP_FirstPgf and FP_NextPgfInFlow.

Thank you very much for you help,

Thai Nguyen

Hi thai,

Paragraph ID is returned as part of the structure of F_TextRangeT, as the Member "objId". Let's say you have:

F_TextRangeT tr;

... then:

TR = F_ApiFind (...);

On an action to search with success, "tr" will contain the pgfId of the paragraph. I'm assuming you're looking for a string that is entirely contained in a paragraph, in which case two ways contains the ID of the paragraph:

tr.beg.objId

TR.end objId

If you want to retrieve all the text in the paragraph after the search, you could do something like: (attention, incomplete code!)

F_TextItemsT ti;

F_TextRangeT tr;

F_ObjHandleT docId.

...

TR = F_ApiFind (...);

TR. Beg.offset = 0;

TR.end.Offset = FV_OBJ_END_OFFSET;

TI = F_ApiGetTextForRange (docId, & b, FTI_String);

.. After that the text of the paragraph will be included in the ti TextItems structure. Navigate through this structure can be difficult and I will renounce any discussion about it for now unless you need more help. There is good information in the developer reference as to its use.

Russ

Tags: Adobe FrameMaker

Similar Questions

  • How can I get more results that contain the tag/bookmark appears in the awesome bar? Currently, it will show only 4.

    When I type a word in the address/url/awesome bar it's a word that I know that I used as a tag on several pages of a bookmark, only 4 results in the menu drop-down are marked pages of a bookmark. The rest of the pages in the menu drop-down are other pages available on the web. Because only 4 results are pages I tagged, the page I want to (and scoring) often does not appear. Is there a setting I can change to make it show more results? Or is there a way once I get the original results to add extra elements containing the tag / my favorites?

    This may be a problem with the Fastestfox extension.
    See Troubleshooting extensions and themes and problems of hardware acceleration to resolve common Firefox problems

    In the FastestFox Options, uncheck the 'Awesomebar improving '.

    See the 10 image in the image gallery: https://addons.mozilla.org/firefox/addon/9825

    https://addons.Mozilla.org/IMG/uploads/previews/thumbs/37/37975.PNG

  • How to break a software, that contains the playlists, mp3 format

    Hi all

    I have a few (exe file) educational software that I got from a friend. and there a few lectures in video Formate and combined into playlists. I want to break it up and get the mp3 files and listen to rather then to look at the Conference. so I can listen at any time.

    Concerning

    Thanks for the quick reply all the

    Hello

    Here to separate the audio from video you must have third-party software, which will help you to separate the audio from the video.

    You can use your favorite search engine and search the Internet for audio that separates the software.

    THIRD PARTY SOFTWARE or LINK WARNING

    With the help of third-party software or a link, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third party software or link can be resolved. Using third-party software or a link is at your own risk.

    If you want to suggest changes in the design here is the link you can make reference to: Microsoft Connect - back products and bug reports. Microsoft...

    https://connect.Microsoft.com/dashboard/Info/

    Thank you, and in what concerns:

    Suresh Kumar-Microsoft Support.

    Visit our Microsoft answers feedback Forumand let us know what you think.

  • When you try to print, get a page that contains the message PCL XL Error, error: InternalError 0 x 50

    Original title: printer Hates Me

    Whenever I try to print anything 1 page out of my printer. It is said.

    PCL XL Error

    Subsystem: TEXT

    Error: InternalError 0 x 50

    File name: cheettext.c

    Line number: 710

    I'm losing my mind!

    PLEASE HELP SOMEONE

    Thank you, Carol

    Hi Carol,.

    Welcome to the Microsoft community!

    When you try to print, you get the message as PCL XL Error, error InternalError 0 x 50.

    PCL XL errors occur when you use the PCL6 drivers.

    1. What is brand and model printer?

    2 - is the printer test page print correctly?

    To fix the problem, you can try to uninstall and reinstall the printer drivers.

    Also, you can turn off the printer for 30 seconds and turn it back on and see if the problem still occurs.

    I hope this helps. If the problem persists, or if you have problems of Windows in the future, let us know and we would be happy to help you.

  • How can I be sure that all the pictures selected for export (all 1600) have been exported to my backup drive (before I remove them on the Mac)

    I want to be sure that all of my 1600 + photos and movies were actually exported to the Seagate backup drive that I installed on my MacbookAir. How can I know it?

    If they have been exported to a single file on the EHD?  And if you have exported them should have exported them as "Original unmodified" in order to get the original video files and not a jpeg thumbnail.

    The best solution, if the Seagate HD is formatted for OS X Extended (journaled) is to save the photo library so that you keep both both original and edited, all projects and metadata (keywords, titles, faces, places, etc.).

  • E4X: How to get the items that contain a string pattern in the name of the node?

    Is there a way to retrieve the children of an XMLList where the name of the node of a child contains a template string?

    For example:

    account <>

    < XblahX / >

    < cow / >

    < YblahY / >

    < / recording >

    How to get items in folder which has a node name that contains the string "blah"?

    var rec: XML =

    ;

    var r: RegExp = / blah /;
    var elems:XMLList = rec.children (). (localName () *.search (r) >-1);
    trace (elems. ToXmlString())

  • Bug: Find/replace does not work if the statement contains the string is too long

    Hello

    in my sequence, I press Ctrl + F to open the Find dialog box and enter a string. All the checkboxes are checked 'Elements for search' and ' limit the search to "is not enabled.

    Now comes the finding it is only announcing the discovery in the main sequence.

    Other places in a sous-suite that are part of a labview vi action setting is not in the list. Also if I open the sequence and I'm looking at this place.

    If I create a comment in the subsequence containing the searchstring, then it is.

    When I open the properties of the action of labview and open the parameter that contains the string and click on check for errors, and then close all and supplementary search then the value lies.

    Is it possible that the variable is too long setting? It's about 200 characters and one thing very nested SationGlobals and the table and the TestSockets. Search string Dees is finally an arrayindex in this grand statement.

    It seems that this is the problem.

    Is this a known bug?

    Solved.

    There was an empty character at the end of the search string...

  • How to change the paragraph style to each paragraph that contains only one anchored object?

    Hello

    I have a document in word that should be converted in indesign. The document contains instructions, each step followed by an image.

    I managed to import the document into Indesign and applied a paragraph with numbering style to everything (text, image).

    Now, how do I change the the paragraph style to each paragraph that contains only an image? I need to get rid of the numbering.

    Thanks in advance.

    If the images are all anchored objects, you can use find/replace to find the anchor point and change the paragraph style only once for all paragraphs.

  • Is it possible to get the name of the folder that contains the current document?

    Hi all!


    I know how to get the name of the active document


    app.activeDocument.name;


    but I was wondering if you could also get the name of the folder that contains the current document. Not sure if this is possible or not, so I thought I'd ask, if so it save me a lot of time.


    Thanks in advance!

    Hi djbgraphicdesign,

    does this work for you?

    if (app.activeDocument.saved){
    alert(app.activeDocument.path.name);
    }
    

    Have fun

  • Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value?

    Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value? I need the actual default value for an individual preference.
    Topic: config shows some default values, but I need the source from which everything: config returns to the default value.
    Any help in this direction is greatly appreciated.

    User Agent

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x 64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    The preferences that are not hidden if they have by default are stored in two JavaScript text files in the Firefox program folder
    You can open them in a tab in Firefox through these links:
    resource:///defaults/pref/firefox.js
    resource:///greprefs/all.js

    (702598/forum/1/702598)

  • How can I add a game action on an object that contains the first click and read reversed to this object even a second click action?

    How can I add a game action on an object that contains the first click and read reversed to this object even a second click action?

    First create a symbol of the object.

    Then add the code in the event click on this symbol as below:

    Insert the code for the mouse, click here

    var bReverse = (sym.getVariable ("reverseDir")! = undefined)? (sym.getVariable ("reverseDir")): true;

    sym.setVariable ("reverseDir", bReverse)

    {if (bReverse)}

    sym.playReverse ();

    }

    else {}

    SYM. Play();

    }

    HTH,

    Vivekuma

  • How to create a formula that highlights the cell that contains the same data that I type in another cell

    Hi, can someone help me make a formula which detects and highlights the value of the cell that contains the items of data that I entered in another cell? Thank you

    resolved to myself

  • How to filter the records that contains the Spanish character?

    Hello

    I had an obligation to always records based on the Spanish character.

    Kindly guide me for below.

    To filter the records that contains Spanish characters?

    For example, I had a value in the column name as 'Sureshn '.

    My query should return the above folder that contains the Spanish character "N".

    Please do the necessary help / advice on that.

    Thank you
    Orahar

    I don't know what you want, because if you want a? ¢ Analysys and Sureshn, then my previous query is sufficient. However, maybe something like that.

    SQL> ed
    Wrote file afiedt.buf
    
      1  WITH Sample_Data AS (SELECT 'â?¢ Analysys' str FROM DUAL UNION ALL
      2     SELECT 'SureshÑ' str FROM DUAL UNION ALL
      3     SELECT 'ABCD' str FROM DUAL UNION ALL
      4     SELECT 'WXYZ' str FROM DUAL UNION ALL
      5     SELECT 'Saubhik' str FROM DUAL
      6     )
      7     SELECT str AS "Contains other than English" from Sample_Data
      8*    WHERE REGEXP_LIKE(str,'[^[a-z,A-Z,0-9]]*')
    SQL> /
    
    Contains other
    --------------
    â?¢ Analysys
    SureshÑ
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  WITH Sample_Data AS (SELECT 'â?¢ Analysys' str FROM DUAL UNION ALL
      2     SELECT 'SureshÑ' str FROM DUAL UNION ALL
      3     SELECT 'ABCD' str FROM DUAL UNION ALL
      4     SELECT 'WXYZ' str FROM DUAL UNION ALL
      5     SELECT 'Saubhik' str FROM DUAL
      6     )
      7     SELECT str AS "Contains English" from Sample_Data
      8*    WHERE NOT REGEXP_LIKE(str,'[^[a-z,A-Z,0-9]]*')
    SQL> /
    
    Contains Engli
    --------------
    ABCD
    WXYZ
    Saubhik
    
  • How to get back to that temporary profile?

    Connected to my laptop with Windows 7 Starter.  Unbeknownst to me at the time, I was connected to a temporary profile where I saved some pictures in a local image file.  Now I can not find the photos logged in my profile.  How to get back to that temporary profile?  I tried to search the name of the image file but no luck.

    Just my name "Tammy" and "Public".

    Sorry, bad news. This means that Windows deleted the profile folder (containing your photos) used for the temporary account.

  • Prepare a document to insert a row that contains the Blob column. Is what sense this correct?

    When we prepare the statement to insert a row that contains the Blob column. Is what sense this correct? And what is the difference? Does anyone know?

    1 Preparestatement.setBlob(parameter number, blob type object)

    2 Preparestatement.setBlob(parameter number, inputstream type object)

    This link shows the test I did.

    https://community.Oracle.com/thread/3680185?SR=Inbox & customTheme = OTN

    When we prepare the statement to insert a row that contains the Blob column. Is what sense this correct? And what is the difference? Anyone know?

    1 Preparestatement.setBlob(parameter number, blob type object)

    2 Preparestatement.setBlob(parameter number, inputstream type object)

    I answered in your other thread and provided a link to the JDBC Dev Guide section, which explains how to work with type LOB and BFILE data.

    Have you read this article from doc?

    Did you read my response to your other thread?

    In java, a BLOB is just the index that gives you access to the content. In your case, you access by selecting a locator BLOB existing and getting his inputstream. This inputstream is what allows you to access the content real blob.

    The Locator is just that; It specifies the LOCATION of the blob content, but NOT the content.

Maybe you are looking for