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

Failed: Script to save ditamap to FM with ditaval file

New Here ,
May 26, 2015 May 26, 2015

Copy link to clipboard

Copied

Hi FM scripting Gurus,

I'm stuck in the following issue and need help:

I'm trying to write a script to save ditamaps to composite FM files with ditaval file specified. I use the document property Constants.FS_DitavalFile (=linux.txt) to specify the ditaval file. Unfortunately, it seems that the script does not execute the SaveCompoFm function. If I remove the Constants.FS_DitavalFile property from the function, the script runs properly. I've no idea what the problem is. The following is the SaveCompoFm function. Is there anything wrong with the code? Thanks a lot for your help!

function SaveCompoFm(file,saveName,ditaval)

{

   

    saveProp = GetSaveDefaultParams()

    i = GetPropIndex(saveProp, Constants.FS_FileType)

    saveProp.propVal.ival =Constants.FV_SaveFmtCompositeDoc

   

    i = GetPropIndex(saveProp, Constants.FS_DitavalFile)

    saveProp.propVal.ival =ditaval

    retParm = new PropVals()

    CompoFm=file.Save(saveName,saveProp,retParm);

    return CompoFm;

}

TOPICS
Scripting

Views

388

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 ,
May 26, 2015 May 26, 2015

Copy link to clipboard

Copied

Think you were trying to get in here - https://forums.adobe.com/community/framemaker/extendscript?view=overview right?

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 ,
May 26, 2015 May 26, 2015

Copy link to clipboard

Copied

Is the ditaval file a path to a file? If so, it would be a string property, so instead of ival = ditaval, try sval = ditaval. -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
New Here ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

LATEST

Hi Rick,

Yes. You are right. I missed the property type. 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