• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show/Hide a document

Community Beginner ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

I have created a document using F_ApiCustomDoc() to output a table data.
Before outputing the table data, I use the following code (1) to hide the document.

(1)F_ApiSetInt(FV_SessionId, docToId, FP_IsOnScreen, False);

And after outputing the table data, I use the following code (2) to show the document.

(2)F_ApiSetInt(FV_SessionId, docToId, FP_IsOnScreen, True);

This code works well until Framemaker2015.
But when I executed with FrameMaker2020, the document isn't shown after (2).

 

I don't know what is causing it.
Do you have any solution?

TOPICS
Error

Views

257

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Jan 17, 2024 Jan 17, 2024

I can confirm the same behavior with FrameMaker 2020 and 2022 using ExtendScript.

#target framemaker

var doc = app.ActiveDoc;
doc.IsOnScreen = 0;
alert (doc.Name);
doc.IsOnScreen = 1;

You should file a bug. Your description is concise enough to copy/paste into the bug tracker.

https://tracker.adobe.com/

Votes

Translate

Translate
Community Expert , Jan 17, 2024 Jan 17, 2024

Here is a workaround that you can rewrite as C code. You make a custom document, but set its initial visibility to false. Add your content to the document and then display it on screen. It works in FrameMaker 2020 with ExtendScript.

 

#target framemaker

var PT = 65536, template, textFrame, textLoc;

// Make a temporary document that will serve as a template.
template = CustomDoc (612 * PT, 792 * PT, 1, 12 * PT, 72 * PT, 72 * PT, 
    72 * PT, 72 * PT, Constants.FF_Custom_SingleSided, false);

/
...

Votes

Translate

Translate
Community Expert ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

I can confirm the same behavior with FrameMaker 2020 and 2022 using ExtendScript.

#target framemaker

var doc = app.ActiveDoc;
doc.IsOnScreen = 0;
alert (doc.Name);
doc.IsOnScreen = 1;

You should file a bug. Your description is concise enough to copy/paste into the bug tracker.

https://tracker.adobe.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

Here is a workaround that you can rewrite as C code. You make a custom document, but set its initial visibility to false. Add your content to the document and then display it on screen. It works in FrameMaker 2020 with ExtendScript.

 

#target framemaker

var PT = 65536, template, textFrame, textLoc;

// Make a temporary document that will serve as a template.
template = CustomDoc (612 * PT, 792 * PT, 1, 12 * PT, 72 * PT, 72 * PT, 
    72 * PT, 72 * PT, Constants.FF_Custom_SingleSided, false);

// Add some text to its first text frame.
textFrame = template.MainFlowInDoc.FirstTextFrameInFlow;
textLoc = new TextLoc (textFrame.FirstPgf, 0);
template.AddText (textLoc, "Hello world!");

// Show the template.
template.IsOnScreen = 1;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

LATEST

Here is a description of the parameters for ExtendScript:

image.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines