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

FDK How to Detect Structured Book/Document in Unstructured FrameMaker

New Here ,
Apr 03, 2012 Apr 03, 2012

Copy link to clipboard

Copied

Hi Everyone,

I have looked from pillar to post on this one.

Basically when you open a Structured document in Unstructured FrameMaker a warning appears stating exactly what you are doing.

I am using FDK and have tried this in both Structured and Unstructured.

The test for structure in a document is to read the FP_HighestLevelElement property,

this returns true in Structured but false for a structured document within Unstructured FrameMaker.

Lost with this one, but if FrameMaker can detect a Structured document in Unstructured then I would much like to do also.

If any input at all could be provided it would be very much appreciated.

TOPICS
Structured

Views

917
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 04, 2012 Apr 04, 2012

Yes, that is correct. F_ApiOpen() requires an input property list (F_PropValsT) and populates a second list after the operation that provides details about what went on. You need to configure the input property list to prohibit the opening of the file (FP_FileIsStructured = FV_DoCancel), then if the file fails to open, query the return property list for the reason. I think the flag you would be looking for is FV_CancelFileHasStructure, but I don't know for sure. In any case, Rick is right... you

...

Votes

Translate
Community Expert ,
Apr 03, 2012 Apr 03, 2012

Copy link to clipboard

Copied

You will have to test for this when you open the document. Once the document is opened, the structure has already been stripped, and thus FP_HighestLevelElement will always return false. You should be able to cancel the open if your client attempts to open a structured document; then you can check the return parameters to see why the open was cancelled. I am not sure exactly how to do this with the FDK, but I know you can do it with FrameScript, so you should be able to do it with the FDK.

Rick Quatro

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 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

Yes, that is correct. F_ApiOpen() requires an input property list (F_PropValsT) and populates a second list after the operation that provides details about what went on. You need to configure the input property list to prohibit the opening of the file (FP_FileIsStructured = FV_DoCancel), then if the file fails to open, query the return property list for the reason. I think the flag you would be looking for is FV_CancelFileHasStructure, but I don't know for sure. In any case, Rick is right... you can't find out after you force it open, because the file is no longer structured at that point.

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
New Here ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

Thank you very much Rick and Russ.

This is great information and answers my question.

I can see the F_PropValsT *openParamsp property list being initialised and passed to F_ApiOpen().

Would much like to mark both as the correct answer, however, the deal breaker was the extra detail from Russ which I can relate to the code in progress.

Thanks again...

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
Community Expert ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

LATEST

That's OK, give it to Russ :-). He just upgraded one of his great plugins (FrameSLT).

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