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?
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.
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);
/
...
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.
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;
Copy link to clipboard
Copied
Here is a description of the parameters for ExtendScript: