Highlighted

Script to save FM files as older version

Community Beginner ,
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.2K

Likes

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

Script to save FM files as older version

Community Beginner ,
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.2K

Likes

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
Dec 01, 2015 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Dec 01, 2015 0
Community Beginner ,
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.

Likes

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
Reply
Loading...
Dec 02, 2015 0
Adobe Community Professional ,
Dec 02, 2015

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Dec 02, 2015 0