1 person found this helpful
I just use a pipe symbol to OR in the constants I need. For example, this one gets paragraph begins and table anchors in a single text list:
var textList = doc.MainFlowInDoc.GetText(Constants.FTI_PgfBegin | Constants.FTI_TblAnchor);
Please let me know if you have any questions or comments. --Rick
Thanks for that simple answer Rick, I appreciate it. I knew it was simpler than the docs presented it.
Assuming that ExtendScript technical writers monitor this forum (and for anyone else with a confusion over this), here are my suggestions to clarify the FrameMaker 10 Scripting Guide, p.452, section on GetText() for the Cell object (and also the Cell.GetText() page in the ExtendScript Object Model docs):
- Give a simple example of the use of the constants with the pipe (OR) character, like Rick's example above. That would have saved a lot of time.
- Instead of presenting the table of constants as the values of TextItem.dataType, present them as the constants you need to give as the flags parameter for GetText(). Now that I know what that table is, it is very useful. But when it is presented as the values of TextItem.dataType with no further explanation, I disregarded it completely because it seemed like something I didn't need to know.
Thanks for listening.