
653
ADOBE FRAMEMAKER SCRIPTING GUIDE
Function Summary
Last updated 9/26/2011
Returns
Doc
Syntax
CustomDoc(width, height, numCols, columnGap, topMargin, botMargin, leftinsideMargin,
rightoutsideMargin, sidedness, makeVisible)
Parameters
DefineMenu
Description
Defines a menu (FO_Menu object). After you define a menu, you can add it to a menu or a menu bar with
AddMenuToMenu()
.
If you call
DefineMenu()
and specify the name of a menu that is already defined in the user’s menu configuration files,
the FrameMaker product gives precedence to the definition in the configuration files. If the configuration files assign a
label to the menu, the FrameMaker product uses it instead of the one you specify.If the user has already defined a menu
with the name specified by name,
DefineMenu()
ignores the label parameter and uses the label specified by the user.
The method returns the new menu on success.
On failure, the method sets
FA_errno
to one of the following values:
Parameter name
Data Type
Optional
Description
width
int
No
The document page width.
height
int
No
The document page height.
numCols
int
No
The default number of columns.
columnGap
int
No
The default column spacing.
topMargin
int
No
The document page top margin.
botMargin
int
No
The document page bottom margin.
leftinsideMargin
int
No
The left margin for single-sided documents, or the inside margin
for double-sided documents.
rightoutsideMargin
int
No
The right margin for single-sided documents, or the outside
margin for double-sided documents.
sidedness
int
No
A constant that specifies whether the document is single-sided
or doublesided and on which side the document starts.
makeVisible
bool
No
Specifies whether the document is visible after it is created. Set
to
True
to make the document visible.
Error
Reason
Constants.FE_WrongProduct (-60)
Current FrameMaker product does not support this operation or
fmbatch
is running
Constants.FE_BadParameter (-43)
Parameter has an invalid value.
Constants.FE_BadOperation (-27)
Parameters specify an invalid operation.
Constants.FE_NotMenu (-72)
name
specifies a command; cannot redefine a command as a menu.