AutoFM Elements

Name and description of the current AutoFM elements.

The following table shows the relationship of the top-level AutoFM elements and their child elements; it is not intended to be representative of a useful AutoFM script:

Table 1. Top-level AutoFM elements
action book file exit
autofm 
  action 
    extendscript 
      script 
      args 
    fdk 
      client 
      args 
    framescript 
      script 
      args 
    select 
      name
autofm 
  book 
    close 
    export 
      name 
    import 
      name 
      template 
    importformats 
      name 
    open 
      name 
      appname 
    pdfsetup 
      pdfdocinfo 
        infoitem 
    print 
      tofile 
    save 
    saveas 
      name 
      appname 
    select 
      name 
    update
autofm 
  file 
    close 
    export 
      name 
    import 
      name 
      template 
    importformats 
      name 
    open 
      name 
      appname 
    pdfsetup 
      pdfdocinfo 
        infoitem 
    print 
      tofile 
    save 
    saveas 
      name 
      appname 
    select 
      name
autofm 
  exit
action

Specifies the action to perform on books and files in FrameMaker. Allow you to select a file or book, then run a script or client command on that file. No attributes.

Contains: extendscript, fdk, framescript, select

Contained by: autofm

appname

Specifies the structure application name to use when opening or saving an XML or SGML file. No attributes.

Contains: TEXT

Contained by: open, saveas

args

Specifies the value of the argument passed to the FDK client or appended to the value of the ExtendScript or FrameScript script name. No attributes.

Contains: TEXT

Contained by: framescript, extendscript, fdk

autofm

The root element of an AutoFM file. No attributes.

Contains: action, book, file, exit

Contained by: none

book

Performs actions on books in FrameMaker. No attributes.

Contains: close, open, print, save, saveas, select, update

Contained by: autofm

client

Specifies the name of the FDK client. No attributes.

Contains: TEXT

Contained by: fdk

close

Closes a file in FrameMaker. No attributes.

Contains: EMPTY

Contained by: book, file

exit

Exits FrameMaker. Closes without saving all open documents before exiting. No attributes.

Contains: EMPTY

Contained by: autofm

export

Exports the current file from FrameMaker in the format defined by the filter attribute. The filter attribute specifies an “export filter hint string” (an 11 or 12 character string). The available export filter hint strings will vary based on the FM version and specific installation. To see the available hint strings, use the Pubs-Tools > AutoFM > Filter Hint Strings command.

Contains: name

Contained by: book, file

extendscript

Runs the ExtendScript specified by the script element. The value of the optional args element is appended to the script name. This is only available in FM10 and later. No attributes.

Contains: script, args

Contained by: action

fdk

Runs the specified FDK client with the value of the args element. No attributes.

Contains: client, args

Contained by: action

file

Performs actions on files in FrameMaker. No attributes.

Contains: close, open, print, save, saveas, select

Contained by: autofm

framescript

Runs the FrameScript specified by the script element. The value of the optional args element is appended to the script name. This is only available if the FrameScript plugin is installed. No attributes.

Contains: script, args

Contained by: action

import

Imports a file into FrameMaker of the format defined by the filter attribute. The filter attribute specifies an “import filter hint string” (an 11 or 12 character string). The available import filter hint strings will vary based on the FM version and specific installation. To see the available hint strings, use the Pubs-Tools > AutoFM > Filter Hint Strings command. To apply an FM template to the file after importing, use the template child element.

Contains: name, template

Contained by: book, file

importformats

Imports the specified formats from the specified file (name node) into the current file (defined by the parent file or book node). Attributes are available for each option in the Import Formats dialog. All attributes default to “0” (disabled); enable (set to “1”) those that you want to import (or use the “alloptions” attribute). Seventeen attributes (depending on FM version):

  • alloptions - Enables all options (FM10 and later, overrides other settings).
  • paragraphfmts - Sets the paragraph formats option.
  • characterfmts - Sets the character formats option.
  • pagelayouts - Sets the page layouts option.
  • tablefmts - Sets the table formats option.
  • colordefs - Sets the color definitions option.
  • documentprops - Sets the document properties option.
  • refpages - Sets the reference pages option.
  • variabledefs - Sets the variable definitions option.
  • crossreffmts - Sets the cross-reference formats option.
  • contextsetgs - Sets the conditional text settings option.
  • mathdefs - Sets the math definitions option.
  • combinedfonts - Sets the combined fonts option (FM9 and later).
  • fbasettings - Enables the paragraph formats option (FM10 and later).
  • objectstyles - Enables the paragraph formats option (FM12 and later, even though this was available in FM11; use “alloptions” to enable in FM11).
  • removebreaks - Enables the paragraph formats option.
  • removeexceptions - Enables the paragraph formats option.

Contains: name

Contained by: book, file

infoitem

Defines a PDF Doc Info entry (field/value pair). Add one infoitem element for each entry.One attribute (required).

  • infofield - Specifies the field name of the PDF Doc Info. Known values are Author, Title, Subject, Keywords, Copyright, Web Statement, Job, Marked. No default.

Contains: TEXT

Contained by: pdfdocinfo

name

Specifies the name of the file to export, import, open, save, or select. No attributes.

Contains: TEXT

Contained by: export, import, select, open, saveas

open

Opens a file in FrameMaker. One attribute:

  • type - Specifies the type of file to open. Values are FM, MIF, XML, SGML. Default is FM.

Contains: name, appname

Contained by: book, file

pdfdocinfo

Defines the PDF Doc Info entries. No attributes.

Contains: infoitem

Contained by: pdfsetup

pdfsetup

Assigns a PDF Job options name. Three attributes:

  • pdfjoboptions - Specifies the PDF joboptions name.
  • pageheight - Specifies the height of the generated PDF (use standard units suffix string, such as “in”, “cm”, “mm”, etc.).
  • pagewidth - Specifies the width of the generated PDF (use standard units suffix string, such as “in”, “cm”, “mm”, etc.).

Contains: pdfdocinfo

Contained by: book, file

print

Prints a file in FrameMaker. Use the tofile element to specify the name of the print file. Attributes match the options in the FrameMaker Print dialog:

  • printername - Specifies the name of the printer. No default value.
  • printrange - Indicates the print range. Values are “all” or “range”. Default value is “all”.
  • startrange - If the value of printrange is “range”, this value sets the start page range number. No default value.
  • endrange - If the value of printrange is “range”, this value sets the end page range number. No default value.
  • oddpages - If set to 1, enables the “Odd-Numbered Pages” option. Default value is “1” (On).
  • evenpages - On set to 1, enables the “Even-Numbered Pages” option. Default value is “1” (Off).
  • collate - If set to 1, enables the “Collate” option. Default value is “1” (On).
  • lastsheetfirst - If set to 1, enables the “Last Sheet First” option. Default value is “0” (Off).
  • skipblankpages - If set to 1, enables the “Skip Blank Pages” option. Default value is “0” (Off).
  • spotcolorasbw - If set to 1, enables the “Spot Color as Black/White” option. Default value is “0” (Off).
  • lowresimages - If set to 1, enables the “Low-Resolution Images” option. Default value is “0” (Off).
  • regmarks - Specifies the value for the “Registration Marks” option. Valid values are “None”, “Western”, and “Tombo”. Default value is “None”.
  • thumbnails - If set to 1, enables the “Thumbnails” option. Default value is “0” (Off).
  • thumbrows - Specifies the number of thumbnail rows if the @thumbnails is set to “1”. No default value.
  • thumbcols - Specifies the number of thumbnail columns if the @thumbnails is set to “1”. No default value.
  • copies - Specifies the number of copies to be printed. Default value is “1”.
  • scale - Specifies the scale of the print job. Default value is “100%”.
  • acrobatdata - If set to 1, enables the “Generate Acrobat Data” option. Default value is “0” (Off).

Contains: tofile

Contained by: book, file

save

Saves the current file or book. No attributes.

Contains: EMPTY

Contained by: book, file

saveas

Performs a Save As operation on the current file or book. One attribute:

  • type - Specifies the Save As operation to perform. Standard values are FM, MIF, XML, SGML, TXT, and PDF. Additional version-specific values are FM6, FM7, FM8, FM9, FM10, FM11, FM12, MIF7, MIF8, MIF9, MIF10, MIF11, MIF12, COMPOSITE, BOOK-XML, BOOK-FM. Default is FM.

Contains: name, appname

Contained by: book, file

script

Specifies the name of an ExtendScript or FrameScript. No attributes.

Contains: TEXT

Contained by: framescript, extendscript

select

Selects a file in FrameMaker for processing. No attributes.

Contains: name

Contained by: action, book, file

template

Specifies the name of the file to use as the template for the file imported with the import command. No attributes.

Contains: TEXT

Contained by: import

tofile

Specifies the print file name to create. No attributes.

Contains: TEXT

Contained by: print

update

Updates the current book. No attributes.

Contains: EMPTY

Contained by: book