Put Data

Command line:
tlapi ‑cPUTDATA ‑tnFlags ‑isInputFile sPart
Library call:
nStatus = TLputdata (sPart, sInputFile, nFlags)
Scripting call:
nStatus = PutData (sInputFile, false)

Function

Load a data file into a partition.

Arguments

sPart

The path of the partition into which the data is to be loaded. The scripting call uses the Partition property to determine the partition to use.

sInputFile

The full pathname of a document file that defines the replacement data.

nFlags

This controls how content is loaded into a non-looseleaf partition

The following values for nFlags apply when loading content into a non-looseleaf partition, change pages partition, or a full looseleaf initial release:

Value Meaning
0

For a linked partition, sInputFile specifies the full pathname of a document file held outside of the repository and referred to by location. Otherwise, a copy of the content of sInputFile replaces the partition document content stored within the TopLeaf repository. This is the default.

2

Forces a partition to be declared as a linked partition. sInputFile specifies the full pathname of a document file held outside of the repository and referred to by location. If the partition was previously declared as a copy partition, any existing document content stored within the repository is deleted.

4

Forces a partition to be declared as a copy partition. A copy of sInputFile replaces any existing document content stored within the TopLeaf repository.

The following values for nFlags apply when loading content into a full looseleaf partition update:

Value Meaning
0

Copy the replacement data into the repository. The state of the show leaf boundary markers partition property determines whether or not the replacement data contains leaf boundary markers that identify the published leaf boundaries. This is the default.

16

When copying a replacement document into the repository, assume the document content does not contain leaf boundary markers. TopLeaf will automatically locate the position of the published leaf boundaries within the replacement content before allocating content to the partition leaf set. This option overrides the state of the show leaf boundary markers partition property.

32

When copying a replacement document into the repository, assume the document content contains leaf boundary markers. TopLeaf will use the boundaries declared in the replacement content when allocating content to the partition leaf set. This option overrides the state of the show leaf boundary markers partition property.

For additional command line arguments see “Common Flag Arguments”.

Scripting Call

The second argument is reserved for future use and must have a false value.

The return value is zero if successful, or one of the values listed in Status Codes if not.

The Markers property is used to control the processing of leaf boundary markers for a full looseleaf partition.

If the partition was edit-locked by a call to GetData, and the AutoEditUnlock property is true, then this method removes the edit lock if successful.

The scripting call does not support changing a partition between linked and copy modes.

Examples

Command line:

tlapi ‑cPUTDATA ‑iC:\mydoc.sgm manuals/topix/volume1

Library call:

status = TLputdata("manuals/topix/volume1", "C:\\mydoc.sgm", 0L);

Scripting call:

status = topleaf.PutData(xmlFile, false);

Notes

The content of a partition can not be updated if the partition is edit locked, or commit locked, or in the process of being typeset.

TopLeaf does not create an undo copy of the partition document when you use this function to update the content of a partition.