
550
ADOBE FRAMEMAKER SCRIPTING GUIDE
Function Summary
Last updated 9/26/2011
NewElementInHierarchy
Description
Creates a structural element (
FO_Element
) at a specified location in the element hierarchy of a structured FrameMaker
document or book.
To create the root element for a book, you must use
NewElementInHierarchy()
. However, you cannot use
NewElementInHierarchy()
to add elements to an unstructured document. You must structure the document first by
adding a root element with
NewElement()
.
For object (noncontainer) elements,
NewElementInHierarchy()
inserts the appropriate type of object for the
element. If there is a matching format rule,
NewElementInHierarchy()
uses it to format the object. Otherwise, the
method uses one of the following default formats:
The method returns the created element, on success.
On failure, the method returns one of the following values to
FA_errno
:
Returns
Element
Syntax
NewElementInHierarchy(elemLoc)
Parameters
Object Type
Object Inserted
Format Used By Default
Constants.
FV_FO_XREF (3)
Cross Reference
Undefined XRef
Constants.
FV_FO_EQN (7)
Equation
Medium
Constants.
FV_FO_MARKER (4)
Marker
Type 11
Constants.FV_FO_TBL (8)
Table with the format and number of rows
and columns specified by the table format.
Format A
if it exists; otherwise, a table with a heading
row, 8 body rows, a footing row, and 5 columns.
Constants.FV_FO_SYS_VAR (2)
Variable
Filename (Long)
Constants.FV_FO_GRAPHIC (6)
A centered 1.0-inch by 1.0-inch anchored
frame below the current position; cropped
is off, and floating is on.
-
Error
Reason
Constants.FE_BadBookId (-66)
Invalid book.
Constants.FE_BadObjId (-3)
Invalid object.
Constants.FE_BadInsertPos (-65)
elemLoc
specifies an invalid place to insert the element; for example, it specifies a
position before the highest element in the flow.
Parameter name
Data Type
Optional
Description
elemLoc
ElementLoc
No
The location at which the element is to be inserted.