How to get the highlighted text range through Framemaker's API calls?

Hi all,
I'm new to the Framemaker API (7.x) and developing a plugin for Framemaker 7.x. I wanted to get the highlighted objects from the active mif document. Tried this code:
F_TextRangeT tr;
/* Get the current text selection. */
tr = F_ApiGetTextRange(FV_SessionId, docId, FP_TextSelection);
Here is how I tested it:
1. some text in the mif doc was highlighted.
2. I clicked the menu item "my_plugin", a framemaker dialog popped up, some test configuration was sent through the dialog.
3. The test configuration was read by my program correctly.
However, the debugger showed that the tr is null! When I changed the first step of the test into:
1. placed the mouse cursor at somewhere in the mif doc.
The plugin worked somehow, the line where the mouse cursor was placed got selected, although I did not highlight anything.
My question is: how to get a highlighted range though the Framemaker API call? I've been flipping through the FDK 7.0 Programmer's Reference but haven't found a solution yet. Any hint will be highly appreciated.
Best Regards,
Ellen N. Zhao

Here is some information from the FDK Programmer's guide page 115:
IMPORTANT: A valid text range can span multiple paragraphs, subcolumns, or text frames.
It cant span multiple flows, footnotes, table cells, or text lines.
It is possible for a document to have no text selection or insertion point at all. This can occur in
the following circumstances:
● One or more graphic objects in the document are selected
● One or more entire table cells in the document are selected
● There is no selection of any type in the document
So, I did select one or more entire table cells in the document in my first test. It's logical that the result was not like expected.
But selecting one or more entire table cells is a crucial requirement for my plugin, is there anyway to get things straight?
Simply put, I want to enable users to select one or more table cells in the document, and I want to get the object handles of the first cell and the last cell through Framemaker API calls. How?
Many thanks in advance!
Best Regards,
Ellen N. Zhao

Similar Messages

  • How to get the bold texts in JTextPane?

    How to get the bold texts in JTextPane?

    I believe you need to look at the Elements of the Document. Use the Document.getDefaultRootElement() method to get the first root Element. From there you can iterate through all the Elements. You should then be able to check the attributes of the element to see if it contains the Bold attribute using something like:
    AttributeSet attributes = element.getAttributes();
    if ( attributes.containsAttribute(StyleConstants.Bold, Boolean.TRUE)
    // do processing here

  • How to get the short text in tcode "msc3n" -- Basic data 2 -- short text.

    I have to display the short text in my report output.
    How to get the short text in tcode "msc3n" ( msc3n --> Basic data 2 --> short text.)?
    Is there any function module availble to get this short text or is this stored in any data base table ?
    Please help me. Your help will be highly appreaciated.
    THANKS.

    Hi,
    Use FM 'READ_TEXT' to get this values.
    Say for exampele my material is  1900001 and batch is 0000000517.
    Then my parameters to the FM will be as follows:-
    Text Name       000000000001900001    0000000517
    Language        EN
    Text ID          VERM
    Text Object     CHARGE
    This information you can get as follows.
    Open the short text window in the text editor.
    Here you can enter the long text.
    In the editor Go to Header and you will find the details.
    Please note that the text name will comprise of
    Material
    Batch
    Plant
    Stor. Location
    if all the details are given.
    I hope this helps you.
    Regards,
    Ankur Parab

  • How to get the Vendor Sub Range details

    Hi
    Can you please let me know, how to get the vendor sub range from SAP tables?
    Thanks
    RK

    Hi,
    For Vendor Sub-Range table, please refer to Table WYT1.
    Regards,
    Nazrin

  • How to get the Arabic text to speech on N8 ?

    How to get the Arabic text to speech on N8 ?

    Unfortunately it is not currently an available option:http://www.nokia.com/global/support/text-to-speech-s60-32-downloads/
    Happy to have helped forum with a Support Ratio = 42.5

  • How to get the size of physical memory by using system call ?

    how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • How to get the Underlined text in JTextPane

    I have a JtextPane with text say "i _like java_ it is a _good language_".
    in the above text i have made "like java" and "good language" underlined. And i have added a mouse listener to this JTextpane. the whole idea is to create a hyperlink so that when the user clicks anywhere on "like java" then i want to get the complete text("like java") where i clicked and using this text i want to do some operation. How can i get the underlined text?
    thanks.

    it was the same i question what i had posted. i didn't get reply there so i posted the same question in a new topic.

  • How to get the Sales Text?

    Hi,
    I need a Function which will help me to read the Sales Text found in the MM03. I am using the following function but it seems I am not getting the NAME right. In the table STXL when I checked the NAME contains the MATERIAL(X7000114BLCK), SALES Org(1000) and Distribution Channel(20) like this "X7000114BLCK      100020". How could I make up this? or is there another easy Function where I could give the Sales Order No, Material or Line Item to get the Sales Text which comes in MM03.
    The Funtion that I used;
    call function 'READ_TEXT_INLINE'
             exporting
                  id              = '0001'
                  inline_count    = 1
                  language        = 'E'
                  NAME            = PO_OBJ
                  object          = 'MVKE'
             tables
                  inlines         = inlines
                  lines           = lines
             exceptions
                  id              = 1
                  language        = 2
                  name            = 3
                  not_found       = 4
                  object          = 5
                  reference_check = 6
                  others          = 7.
    Thanks,
    Kishan

    Hi Hymavathi,
    I did like this;
    DATA v_tmp(18) TYPE c.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
         EXPORTING
             input  = wa_sales-matnr
         IMPORTING
             output = v_tmp.
    CONCATENATE v_tmp 'XXX' INTO PO_OBJ.
    The answer that I get is this - "X7000114BLCKXXX" the spaces beteeen the MATNR and XXX is not there. How could I get this?
    Thanks,
    Kishan

  • How to Extract the Highlight Text in PDF File

    Hi Scripters,
    i want know, how to extract the hightlight text in pdf files for text only format for (*.txt) file extension save.
    regards
    baby

    Hi,
    Okay i'll try do best.
    thanks for your reply.
    Regards
    Baby

  • How to get the field texts from abap dictionary into screen Text fields

    Hi SapAll.
    here i have got to modify one zscreen by adding 1 more field,when i added one field in teh screen by just writng the code in program as SELECT-OPTIONS ilart FOR CAUFVD-ILART.
    but iam unable to get the field text for the text field from teh table CAUFVD.
    CAN ANY BODY HELP ME IN THIS.
    regards.
    varma

    Hi Varma,
    Even if you want to personalise the Text also you can do without checking the DICTREF checkbox. Dirctly you can give the text in the Text elements by using the Menu GOTO -> Text Elemetns -> Selection Texts.
    Regards
    Thiru

  • How to get the relevant text in the Cone Chart(WAD)

    Hi Expert's,
      Here is a requirement where we are using the CONE chart.
    But we are not getting the relevant texts based on the query attached.
      Plz help me to get the texts.
    Thanks in Advance.
    Vasu.

    Expert's plz look into it..this is very urgent.

  • How to get the numeric value of DocTotal from UI API

    When I hit the ADD button I need to get the DocTotal from the UI API !
    All I have is the EditText which gives it in string and the problem is to double.Parse it
    it's a pain to do it while there is CultureInfo related issue with it.
    So It would be wise to get the numeric value directly from the UI API instead of getting the DocTotal by string and trying to convert it.  So is there any way to get the numrci value of DocTotal from UI API ?

    Hello Marc,
    Here is a function which considering the Culture Info and always working. You can speed it up by using extending admininfo to global vairables, and loading the values at startup of the addon.
    Use the oEditText.value.ToString() to convert into into the doulbe number:
    Public Function _string2double(ByVal s As String) As Double
            Dim d As Double
    ' This part is fast, when regional settings equal to sap B1 settings:
            Try
                d = Convert.ToDouble(s)
                d = Math.Round(d, 6)
                Return d
            Catch
            End Try
    ' Speed up performance: extend CompaneService variables to global variables and query them at addon startup.
            Try
                Dim nfi As System.Globalization.NumberFormatInfo = System.Globalization.CultureInfo.CurrentCulture.NumberFormat
                Dim oCompanyService As SAPbobsCOM.CompanyService = oCompany.GetCompanyService()
                Dim oAdminInfo As SAPbobsCOM.AdminInfo = oCompanyService.GetAdminInfo()
                Dim sbodsep As String = oAdminInfo.DecimalSeparator
                Dim sbotsep As String = oAdminInfo.ThousandsSeparator
                If s.IndexOf(Space(1)) > 0 Then
                    If oAdminInfo.DisplayCurrencyontheRight = BoYesNoEnum.tYES Then
                        s = s.Substring(0, s.IndexOf(Space(1)))
                    Else
                        s = s.Substring(s.IndexOf(Space(1)), s.Length - s.IndexOf(Space(1)))
                    End If
                End If
                Dim s1 As String = s.Replace(sbotsep, nfi.NumberGroupSeparator)
                s1 = s1.Replace(sbodsep, nfi.NumberDecimalSeparator)
                d = Convert.ToDouble(s)
                d = Math.Round(d, 6)
                Return d
            Catch
                Return 0
            End Try
        End Function
    Regards,
    J.
    Edited by: János Nagy on Oct 7, 2009 8:55 AM

  • How to get the standard texts available in a smartforms

    Hi Experts,
        How can we find out the standard texts that are exist in a particular smartform . is there any table/function module available to get those standard texts? I am finding the table STXFTXT, from that I am getting only textline. But I need the standard text names that are used in a smartform.
    Thanks & Regards,
    Suresh

    hi,
    1,Use SO10 Tcode to write standard text in Smartform.
    2.For long text
    method1
    Create TEXT node- general attributes change text type to include text
    then you can input text name/text object/text id/language
    method2
    create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
    then use LOOP or TABLE node to display it
    For TEXT module(For foreign language)
    Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
    then enter smartform Create TEXT node- general attributes change text type to text module
    input the text module name which created by above
    3.
    1. take function module name of the smartform.
    2. goto se37 and type that fm name.
    3. goto attributes tab
    4. double click on either program or include .
    5. There u can find all the subroutines used inside smartform.
    6. search for "perform %move using %textkey-name".
    4.Standard Texts are created in SO10 Tcode and stored in STXH table with OBject ,ID and NAME parameters. We can use Read_Text FM to read the text.
    check the tables STXH & STXL.
    5.
    How to CAll Standard Text in Smart Forms
    In SFs you can insert the standard tests using the TEXT node. Create a TEXT NODE. Then in the GENERAL ATTRIBUTES of this TEXT node select INCLUDE TEXT in the TYPE option. Then you have to enter the text name, object , ID and language in the provided fields. Then if you dont want any error if there is no text in the corresponding text then CHECK the check box "No errors if no text available.

  • How to get the PDF Text position, font, size, align...?

    Hi~!
    I can extract all the text from the PDF file, but just plain text.
    I need their format, position, font, size, align.
    I am using C#, IAC, and read the SDK carefully.
    How to get them?
    Thanks for every hint on how to achieve this!
    Jason Wang

    "Often this is a rectangle, sometimes not (e.g. for italic text the box
    may be slanted too)."
    Sometimes it lines up with the horizontal axis, sometimes not.
    Aandi Inston
    =====================================================
    "Remember, in PDF, the origin is BOTTOM LEFT... "
    Leonard Rosenthol
    =====================================================
    Thank you, Aandi, Leonard, Thanks a lot
    Jason Wang

  • How to get the Highlighted Item on DataGrid?

    Hello everybody...
    I've already searched in a bunch of sites and forums, and i can't find anything...
    I need to get some data on the Highlighted (not selected) Item on my DataGrid (I intend to use MouseOver event)...
    does anyone have a clue on how to do that?
    ps. sorry for grammar mistakes... my english is not very good...

    Hi
                 I have done some exercise on that but i could not found any solution for this .. but one thing when u use mouse over effect flex will take the object of the datagrid not that object of the row u mentioned..
             when u place mouse on that datagrid it will automatically take that datagrid as object i think so ..
                       let us know if u get any solutions on that perticular task.. Because i have some what interest on this task.. This is some what new task for me to work out...
                  thanks for posting ...

Maybe you are looking for

  • Is there a way to copy attributes from one composition to another?

    I'm using After Effects 7.0 I'd like to copy the same Zoom attributes from one composition to 30 photographs. In Final Cut, you can copy attributes from one clip to another. Or from one still photo to another. Is there a way to do that in AE 7? Thanx

  • How do i get ipad games to a vizio tablet

    how do i get ipad 2 gamesto my vizio tablet i sent $35 on a micro sdcard to transfer the games but it dosent fit in the ipad so i tried geting it off my mac book but it wont leave the ipad files. so what do i do

  • Oracle JDBC Connectivity

    I am trying to connect to oracle8.0.5 database from JDK1.3 on windows 2000 os my program code is as follows import java.sql.*; class JEmpt{ public static void main (String args [])      throws SQLException {      try           Class.forName("oracle.j

  • Oracle Analytic function tuning

    Hi all, Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Productio NLSRTL Version 10.2.0.3.0 - Production I have

  • Excel Download from Portal

    I have a requirement to download R/3 data to MS Excel from a portal page.  I have developed a JSPDynPage iView to allow various user parameters to be entered, and retrieve data from R/3 by executing a remote function module (using JCA).  I've reviewe