Failed: Script to save ditamap to FM with ditaval file
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;
}
