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


hi all,

i'm new framemaker api (7.x) , developing plugin framemaker 7.x. wanted highlighted objects active mif document. tried code:

f_textranget tr;
/* current text selection. */
tr = f_apigettextrange(fv_sessionid, docid, fp_textselection);

here how tested it:

1. text in mif doc highlighted.
2. clicked menu item "my_plugin", framemaker dialog popped up, test configuration sent through dialog.
3. test configuration read program correctly.

however, debugger showed tr null! when changed first step of test into:

1. placed mouse cursor @ somewhere in mif doc.

the plugin worked somehow, line mouse cursor placed got selected, although did not highlight anything.

my question is: how highlighted range though framemaker api call? i've been flipping through fdk 7.0 programmer's reference haven't found solution yet. hint highly appreciated.

best regards,
ellen n. zhao

here information fdk programmer's guide page 115:


important: valid text range can span multiple paragraphs, subcolumns, or text frames.
it cant span multiple flows, footnotes, table cells, or text lines.
it possible document have no text selection or insertion point @ all. can occur in
the following circumstances:
● 1 or more graphic objects in document selected
● 1 or more entire table cells in document selected
● there no selection of type in document


so, did select 1 or more entire table cells in document in first test. it's logical result not expected.

but selecting 1 or more entire table cells crucial requirement plugin, there anyway things straight?

simply put, want enable users select 1 or more table cells in document, , want object handles of first cell , last cell through framemaker api calls. how?

many in advance!

best regards,
ellen n. zhao


More discussions in Adobe FrameMaker


adobe

Comments