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

Bizzare problem while handling open documents.

Participant ,
May 13, 2016 May 13, 2016

Copy link to clipboard

Copied

Hi.

I am facing a bizarre problem when I retrieve the open documents with the following code:

for (F_ObjHandleT docId = F_ApiGetId(FV_SessionId, FV_SessionId, FP_FirstOpenDoc); docId; docId = F_ApiGetId(FV_SessionId, docId, FP_NextOpenDocInSession))

{

    StringT documentFilePath = F_ApiGetString(FV_SessionId, docId, FP_Name);

    ....

}

If I paste from e.g. Microsoft Word any formatted text and paste it to a new document in FrameMaker when I try to get all open documents I get not only my new document but also a temporary document with filepath: C:\Users\Me\AppData\Local\Temp\FRS375F.fm.

This file contains the same information that I have pasted in my new document and also does not exit physically.

Can somebody please tell me why is this happening?

TOPICS
Scripting

Views

300

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

Participant , May 16, 2016 May 16, 2016

I have found a way to handle the temporary files people. Thanks.

Votes

Translate

Translate
Participant ,
May 13, 2016 May 13, 2016

Copy link to clipboard

Copied

Actually I don't mind that FM produces such documents. How I can ignore these?

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
Participant ,
May 16, 2016 May 16, 2016

Copy link to clipboard

Copied

I am facing the following problem:

When I get the temporary document file path I get it in long Windows path.

However, when I use the FP_TmpDir value from FM I get the short DOS version of the path.

So, I cannot do a "contains" or "isPrefix" since the two paths are different.

What I want to do is to skip the temporary files that FM creates.

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
Participant ,
May 16, 2016 May 16, 2016

Copy link to clipboard

Copied

LATEST

I have found a way to handle the temporary files people. Thanks.

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