Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

FrameMaker Internal Errors when using script to generate FM books

$
0
0

I developed a script to automate the generation of large FrameMaker books from Ditamap and XML files.  The script successfully generates 2 or 3 of these large books before FrameMaker crashes midway through the book generation with the following error message:

 

FM error.PNG

The point at which FrameMaker crashes appears to be totally random and the internal error code often changes as well.  Some research on these forms led me to believe that it was due to saving the book to a network drive, so I modified the script to save to my C: drive and the crashes got WORSE!  My FrameMaker 11 is patched to the latest version and I've got 50 gigs of free space on my drive.

 

I use the following function to save the ditamap/xml files as FM books:

 

function saveToFm(fileObject, savePath, ditaValFile) {      var saveParams = GetSaveDefaultParams();          var i = GetPropIndex(saveParams, Constants.FS_FileType);      saveParams[i].propVal.ival = Constants.FV_SaveFmtBookWithFm;        var i = GetPropIndex(saveParams, Constants.FS_DitavalFile);      saveParams[i].propVal.sval =  "ditaVal dir filepath" + ditaValFile        var saveAsName = savePath;      var returnParamsp = new PropVals();      fileObject.Save(saveAsName, saveParams, returnParamsp);  
}  

 

My "ditaVal dir filepath" is a network drive location, but I removed it from this post to protect personal/company info.

 

One solution I thought of is closing and reopening FrameMaker after every successful book generation, but app.Quit() doesn't work and app.Close() only works if I run the script from FrameMaker, which means that once the app closes it will not reopen.

 

I created 2 .bat files, one to launch and one to quit FrameMaker, but when I use the quitFM.bat in the script it is then unable to relaunch FrameMaker with the startFM.bat.  Both .bat files do exactly what I want when I run them by themselves.

 

Any ideas how to fix this?


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>