Skip to main content
Inspiring
September 8, 2025
Answered

ESTK show Hide Conditional Text tags in a book?

  • September 8, 2025
  • 1 reply
  • 168 views

@frameexpert I have an existing script to show/hide conditional text in a document - see https://community.adobe.com/t5/framemaker-discussions/estk-script-line-to-refresh-show-hide-conditional-text-pane-needed/m-p/14152329

 

In FrameMaker, the Show/Hide Conditional Text pane works on the book level, so I thought I could just change all references to doc in my script to book.

 

I'm getting an error on book.GetNamedObject (Constants.FO_CondFmt, "Format 1");

 

I noted in the FrameMaker Scripting reference, there is app.GetNamedObject and doc.GetNamedObject, but no book.GetNamedObject.

 

I'm assuming I will need to open the first doc in the book to get the conditional format names, and then process each document in the book to show/hide them.

 

I think I can figure out how to do that (thanks to  https://community.adobe.com/t5/framemaker-discussions/searching-a-book-using-extendscript/td-p/13268771 and similar) - I just want to make sure there isn't a simpler solution before I dive too deeply into this.

 

Thanks in advance!

Correct answer frameexpert

In scripting, it works at the document level. The book-level control in the FrameMaker interface is just a convenience, but FrameMaker still opens and closes each document.

1 reply

frameexpert
Community Expert
Community Expert
September 8, 2025

You have to open each document, do the show/hide, save and close it.

Inspiring
September 8, 2025

@frameexpert - Thank you - follow-up, does 

if (CondFmt.CondFmtIsShown === 1){

}

work at the book level, or just the doc level?

Trying to determine at what point I need to close the first doc in the book during execution of the script.

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
September 8, 2025

In scripting, it works at the document level. The book-level control in the FrameMaker interface is just a convenience, but FrameMaker still opens and closes each document.