Highlighted

FrameMaker12 dialog suppression and configurations

Community Beginner ,
Jan 02, 2018

Copy link to clipboard

Copied

Greetings. I am attempting to create a command line script for use with FrameMaker12 and my question is in regards to the suppression of dialog screens when opening a FrameMaker (.fm) file/document. I have looked at the following resources for a solution

What I have noted is that the FM API allows a developer to control custom or pre-defined dialogs and there are various suppression options for different dialogs (i.e. -  SuppressXMLWarnings, SuppressFontAlertOnOpen). However, I have been unable to locate if there is an API call to set an option to suppress ALL dialogs (regardless of the  dialog) or a specific dialog ( in this case, a dialog that states a paragraph tag does not exist in the Paragraph Catalog)?

Is there an option or API call that suppresses all/specific dialogs? Also, can the various configuration options listed in maker.ini be accessed through the FM API?

Thank you in advance.

TOPICS
Scripting

Views

315

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

FrameMaker12 dialog suppression and configurations

Community Beginner ,
Jan 02, 2018

Copy link to clipboard

Copied

Greetings. I am attempting to create a command line script for use with FrameMaker12 and my question is in regards to the suppression of dialog screens when opening a FrameMaker (.fm) file/document. I have looked at the following resources for a solution

What I have noted is that the FM API allows a developer to control custom or pre-defined dialogs and there are various suppression options for different dialogs (i.e. -  SuppressXMLWarnings, SuppressFontAlertOnOpen). However, I have been unable to locate if there is an API call to set an option to suppress ALL dialogs (regardless of the  dialog) or a specific dialog ( in this case, a dialog that states a paragraph tag does not exist in the Paragraph Catalog)?

Is there an option or API call that suppresses all/specific dialogs? Also, can the various configuration options listed in maker.ini be accessed through the FM API?

Thank you in advance.

TOPICS
Scripting

Views

316

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
Jan 02, 2018 0
Adobe Community Professional ,
Jan 02, 2018

Copy link to clipboard

Copied

There are various ways to suppress some of the warnings when you open a FrameMaker document using the FDK and ExtendScript (and FrameScript). For example, this ExtendScript function opens a document and suppresses missing fonts, graphics, unresolved cross-reference warnings, etc.

function openDocOrBook (filename, structuredApplication, visible) {

  

    var i = 0, docOrBook = 0;

    // Get default property list for opening documents.

    var openProps = GetOpenDefaultParams ();

    // Get a property list to return any error messages.

    var retParm = new PropVals ();

    // Set specific open property values to open the document.

    i=GetPropIndex (openProps,Constants.FS_AlertUserAboutFailure);

    openProps.propVal.ival=false;

    i=GetPropIndex (openProps,Constants.FS_MakeVisible);

    openProps.propVal.ival=visible;

    i=GetPropIndex (openProps,Constants.FS_FileIsOldVersion);

    openProps.propVal.ival=Constants.FV_DoOK;

    i=GetPropIndex (openProps,Constants.FS_FileIsInUse);

    openProps.propVal.ival=Constants.FV_ResetLockAndContinue;

    i=GetPropIndex (openProps,Constants.FS_FontChangedMetric);

    openProps.propVal.ival=Constants.FV_DoOK;

    i=GetPropIndex (openProps,Constants.FS_FontNotFoundInCatalog);

    openProps.propVal.ival=Constants.FV_DoOK;

    i=GetPropIndex (openProps,Constants.FS_FontNotFoundInDoc);

    openProps.propVal.ival=Constants.FV_DoOK;

    i=GetPropIndex (openProps,Constants.FS_RefFileNotFound);

    openProps.propVal.ival=Constants.FV_AllowAllRefFilesUnFindable;

    if (structuredApplication !== undefined) {

        i=GetPropIndex (openProps,Constants.FS_StructuredOpenApplication);

        openProps.propVal.sval=structuredApplication;

    }

    // Attempt to open the document.

    docOrBook = Open (filename,openProps,retParm);

    if (docOrBook.ObjectValid () === 1) {

        // Add a property to the document or book, indicating that the script opened it.

        docOrBook.openedByScript = true;

    }

    else {

        // If the document can't be open, print the errors to the Console.

        PrintOpenStatus (retParm);

    }

    return docOrBook; // Return the document  or book object.

}

But I don't think you can do this if you are launching a FrameMaker document from the command line. One possible solution is to have a script (either ExtendScript or FrameScript) load on FrameMaker startup that will open the document that you want. If you give me more details one what you are trying to do, I may be able to give you some more specific ideas. 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...
Jan 02, 2018 0
Adobe Employee ,
Jan 03, 2018

Copy link to clipboard

Copied

You will probably need FrameMaker Publishing Server for this kind of automation, as this kind of automation (running FM from command line) violates the End User License Agreement (EULA) of a normal FrameMaker License.

Please contact me so that we can discuss in more detail what exactly you want to do and if FM Sever can cover this.

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...
Jan 03, 2018 0