Skip to main content
Inspiring
Sep 8, 2025 1:32 PM UTC
Answered

ESTK show Hide Conditional Text tags in a book?

@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!

frameexpert
frameexpertCorrect answer
Community Expert
Sep 8, 2025 2:22 PM UTC

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.

www.frameexpert.com

4 replies

frameexpert
Community Expert
Community Expert
Sep 8, 2025 1:40 PM UTC

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

Translate
www.frameexpert.com
Inspiring
Sep 8, 2025 2:01 PM UTC

@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.

Translate
frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
Sep 8, 2025 2:22 PM UTC

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.

Translate
www.frameexpert.com