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;
}
Copy link to clipboard
Copied
Think you were trying to get in here - https://forums.adobe.com/community/framemaker/extendscript?view=overview right?
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
Copy link to clipboard
Copied
Hi Rick,
Yes. You are right. I missed the property type. Thanks!