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

How to avoid "WARNING: document is INVALID!" pop-up of F_ApiSave

Guest
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

We built some DLLs to generate "subsets" of our documents for certain postprocessing applications outside of the FM GUI. These subsets are sometimes not as complete as the EDD/XSD requires. So the pop-up is legal - but keeps us from doing the postprocessing in an over-night batch job.

Another point where the same pop-up is a major PITA is when a complex operation - automated as DLL - needs to write an "almost perfect" (temporary) document to disk.

I tried all (documented) properties of the F_ApiSave method, but nothing affected this "WARNING".

TOPICS
Structured

Views

531
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 1 Correct answer

Mentor , Apr 22, 2011 Apr 22, 2011

Hi HarryIFX,

Unwanted and unavoidable popups have been a huge thorn in the side of FDK developers probably since the beginning. Up until recently, no one had a solution. However, Rick Quatro posted the following on the Yahoo Frame_dev list on Sept. 10, 2010, which appears to be the most glorious gift to the community in some time. It does not deal specifically with the message you want to avoid and I haven't personally tested it at all, but it seems to have promise for the problem in general. Her

...

Votes

Translate
Mentor ,
Apr 22, 2011 Apr 22, 2011

Copy link to clipboard

Copied

Hi HarryIFX,

Unwanted and unavoidable popups have been a huge thorn in the side of FDK developers probably since the beginning. Up until recently, no one had a solution. However, Rick Quatro posted the following on the Yahoo Frame_dev list on Sept. 10, 2010, which appears to be the most glorious gift to the community in some time. It does not deal specifically with the message you want to avoid and I haven't personally tested it at all, but it seems to have promise for the problem in general. Here is a replicate of that post:

>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>

Re: FM8: Message about missing referenced graphics - how to get rid of  it?

I finally found out how to do this. Compile the following code and  register the

DLL in the [APIClients] section of your maker.ini. It will "look" for  the

"Cannot display some imported graphics. The images will appear as gray  boxes"

message and suppress it. I tested it with FrameMaker 8 and above, and it  works.

Please let me know if you have any questions or comments. Thanks.

Rick Quatro

#include "fapi.h"

#include "fdetypes.h"

#include "futils.h"

VoidT F_ApiInitialize(IntT init)

{

if (init == FA_Init_First)

{

F_ApiNotification(FA_Note_Alert, True);

F_ApiBailOut();

}

}

VoidT F_ApiNotify(IntT notification, F_ObjHandleT docId, StringT  filename, IntT

iparm)

{

F_ObjHandleT alertId;

IntT uniq;

switch (notification)

{

case FA_Note_Alert:

// Get the id of the alert.

alertId = F_ApiGetId(0, FV_SessionId, FP_ActiveAlert);

uniq = F_ApiGetInt(FV_SessionId, alertId, FP_Unique);

// If the alert is "Cannot display some imported graphics...", supppress  it.

if ((uniq == 40086) || (uniq == 40090))

{

F_ApiReturnValue(FR_YesOperation);

}

break;

default:

break;

}

F_ApiBailOut();

}

>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>

Votes

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
Guest
Apr 27, 2011 Apr 27, 2011

Copy link to clipboard

Copied

Thanks to Rick for the brilliant idea and to Russ for pointing it out. I especially like the classification "experimental interface" in the FDK sources 😉

The only morsel of wisdom I can add is the number 46001, which indicates the dreaded "document is INVALID".

BTW, is there a list of all the message codes?

Votes

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
Mentor ,
Apr 27, 2011 Apr 27, 2011

Copy link to clipboard

Copied

LATEST

harryIFX,

I think it is safe to say there is no list, especially as this is undocumented in general. You just need to figure them out one by one, as you did. I hope that "experimental" doesn't mean "will go away some day."

Russ

Votes

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