Copy link to clipboard
Copied
Hi,
I have a table object, and I've determined that the table has a title by finding a valid FirstPgf object.
Now I want to check that FirstPgf object to see if the system variable, Table Continuation, is there.
I suspect this involves getting the paragraphs text items, specifically the constant FO_Var. But I don't know how to do it.
Thanks for the advice.
Jason
Copy link to clipboard
Copied
#target framemaker
var doc = app.ActiveDoc;
// Cursor in the table title paragraph.
var pgf = doc.TextSelection.beg.obj;
// Get a list of the variables in the paragraph.
var textList = pgf.GetText (Constants.FTI_VarBegin);
for (var i = 0; i < textList.length; i += 1) {
var variable = textList.obj;
// Display each variable's format name.
alert (variable.VarFmt.Name);
}
Rick