Copy link to clipboard
Copied
Hi Adobe Framer Community-
Does anyone know which FM Object the Constants.FV_SaveFmtBookWithFm property value constant is a property of? I think it's a property of the Doc object, but I'm having trouble finding documentation on how to work with this and/or to confirm this.
I am working on an ExtendScript script to automate the PDF process from DITA/XML files in FrameMaker 11 and following the directions on pg. 11 of the Adobe FrameMaker 10 Scripting Guide (also outlined very nicely on FrameAutomation.com) to get the notification set up. I'm using Constants.FA_Note_PreSaveDoc here, and I can get an alert to display the iparam (=0), the sparam (=..\GettingStarted.fm), and the object type (=object Doc).
So if the notification tells me the object type is Doc when I perform a Save Ditamap As -> Book 11 with fm components (*.book), how do I determine what (in the Doc object) the Constants.FV_SaveFmtBookWithFm property goes to? As far as I can tell, the Doc object contains the first page, followed by the paragraphs, etc. Does the Constants.FV_SaveFmtBookWithFm property value belong to some other object perhaps?
Thanks for any and all suggestions!
Diana
Copy link to clipboard
Copied
Hi Diana, This constant works with the FileType property when you save a book. I don't know any of the details about how it works. What exactly do you want to do when the notification is received? If it is easier to discuss this on the phone, feel free to call me. You know how to get a hold of me. Thanks. --Rick
Copy link to clipboard
Copied
Hi Rick,
Thanks very much! It sounds like I should try adding the Constants.FA_Note_PreFileType to the switch in my setupNotifications function. I'll try playing around with that first and see if I can make some headway before calling.
When the notification is received, I want my script to copy template files that are either landscape or portrait in orientation into the default directory my ditafm-output.ini file is pointing to for my output files (based on the actual file name of the ditamap being saved as book 11 w/fm components).
Basically, I want to remove user error and have FrameMaker automatically copy the correctly-oriented template files into the default output directory so, for example, when I save my user guide (landscape) I don't let it churn for 40 minutes only to discover I forgot to change the output templates to landscape, and the entire guide (incorrectly) appears in portrait.
I'll see what I can try today/tonight and then will most likely call you tomorrow!
Thanks,
Diana