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

Script to save FM files as older version

Explorer ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

I'm working on some scripts to save FrameMaker books to older Frame and MIF versions. I'm using a framework kindly supplied by Rick Quatro to run through all the documents in a book. When I run the script from FrameMaker 12, I can save to FM 9, 10 and 11, and to MIF 7, so the script works correctly.

But when I try to save to MIF 9, 10 or 11 or FM 7, the script fails silently, and my files are not updated.

I'm using this code to specify the file format:

saveParams.propVal.ival =Constants.FV_SaveFmtBinary70;

    doc.Save(name, saveParams, returnParams);

According to the Object Model Viewer, the following constants are available for FV_SaveFmt:

FV_SaveFmtInterchange110;

FV_SaveFmtInterchange100;

FV_SaveFmtInterchange90;

So it looks like these constants are read-only: I can check if a file currently has this format but I cannot write a file in this format. The Object Model Viewer doesn't say anything about this, though.

Am I correct? Is it impossible to save to MIF 9, 10 or 11 or FM 7 from FrameMaker 12? Or am I overlooking something?

Harro de Jong

TOPICS
Scripting

Views

1.5K

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 ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

Hi Harro,

I am not sure it matters. I use Constants.FV_SaveFmtInterchange which just uses the current version of FrameMaker to save as MIF. The only reason that version 7 is significant is because it is the last pre-unicode  version of FrameMaker and probably uses a different character set. I can't think of a reason that you would need to specify any other MIF version.

Rick

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
Explorer ,
Dec 02, 2015 Dec 02, 2015

Copy link to clipboard

Copied

We exchange FrameMaker documents with a large number of translators. Some translators use older versions of translation software which do not accept MIF 12 files. Specifically, Trados 2011 needs MIF 11 or below. I'd rather not convert every document to MIF 7, to prevent character conversion issues.

I could try editing the first line of a MIF 12 file to change the version number to 11, and see if Trados 2011 reads those files correctly.

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 ,
Dec 02, 2015 Dec 02, 2015

Copy link to clipboard

Copied

LATEST

I understand. I just tested this with FrameMaker 2015 and the only values that work are FV_SaveFmtInterchange and FV_SaveFmtInterchange70. Interestingly, FV_SaveFmtInterchange130 also works. It looks like you can use the number of the current FrameMaker version you are using, but there is no reason to since you can just use FV_SaveFmtInterchange.

I suspect that you can simply change the version number and Trados will be fine with it. If you have a lot of files and you want to script this, please let me know. Thanks. -Rick

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