Scripting Interface Properties

Repository

String (read/write)

This is the path to the root of the TopLeaf repository. When the scripting control is created it is set to the repository location as described in “Repository Location”.

Partition

String (read/write)

This is the path to the current partition, relative to the repository root. Components in a partition path are separated by '/' (forward slash) characters.

Methods which create partitions set this property to the path of the new partition if successful.

The format of a partition path is discussed in “Partition Paths”.

Note that when this property is set the values of the Phase and ComposeStatus properties will be changed to reflect the state of the new partition.

Phase

String (read/write)

This is the phase of the partition to use.

It defaults to CURRENT when the scripting control is created. This value can be used with any partition.

When the Partition property is changed the Phase property is set to the current phase of the partition.

This property can only be set to one of the values INITIAL, UPDATE, PUBLISH or CURRENT. The assigned value will be converted to upper case if necessary. An attempt to set an illegal value leaves the current value unchanged and sets the message property to “Illegal phase value”.

Status

Integer (read only)

This contains the status value returned by the last operation. A zero value indicates success. See Status Codes for a list of other status codes.

Message

String (read only)

Certain operations place a diagnostic or informative message in this property.

ComposeStatus

Integer (read only)

This indicates the status of the most recent composition run. Its value is changed when the Partition property is set to a valid partition path, or when a method that performs a composition is called.

The possible values are:

  • 0 = composition succeeded

  • 1 = composition completed with warnings

  • 2 = composition completed with errors

  • -1 = no composed pages are available

  • -2 = composition aborted or partition corrupt; page data may be unreliable

A zero value means that page data is available and is an accurate rendition of the input data.

A value greater than zero means that data is available and is suitable for use, but may not faithfully reflect the input data. A warning indicates that the input data has been rendered, but the requested format could not be implemented exactly (for example, a word too long to fit in a table cell). An error indicates that some part of the data may be missing (for example, a graphic that could not be found). Review the composition log to determine the precise problem (see the GetLog method).

A value less than zero means that the page data, if it exists, may not be suitable for use.

When the Partition property is changed the ComposeStatus property is changed to reflect the result of the last composition run for the new partition. In this case the value may not reflect the availability of page data.

OutputFile

String (read only)

A method that creates an output file will set this property to the full path of the created file. If no file can be created the property is set to the empty string.

PdfLog

String (read only)

If any messages are generated during PDF creation by XmlToPdf or GetPDF (warnings or errors), then this property will be set to the full path of the log file containing the messages. It contains an empty string if no messages were generated.

ChangedPages

Boolean (read/write)

When this property is set to true, the GetPDF, GetGenerated and Print methods will only select pages that have changed since the last release. Its initial value is false.

This property has no effect if the partition is in its initial release, or if page differencing is not enabled. See “Looseleaf Publishing and Version Control” in the User Guide for more information.

AutoEditUnlock

Boolean (read/write)

This property controls the behavior of the PutData method. When it is true, a successful PutData call removes the edit lock set by GetData (if any). If it is false, the edit lock can only be removed by calling UnlockPartition.

Note that changing the current partition clears the lock status. This means that automatic unlocking will not work if you assign a value to the Partition property between the calls to GetData and PutData.

The initial value of this property is true.

Version

String (read only)

This property contains a string describing the version of TopLeaf installed. It contains a number of space-separated fields. For a description of the format see the output produced by the ‑v flag in the command-line interface.

Markers

Integer (read/write)

This property controls the behavior of the PutData method when processing leaf boundary markers for a full looseleaf partition. The permitted values are:

  • 0: marker-mode is determined from the partition properties

  • 1: assume marker-less mode

  • 2: assume marker mode

The initial value of this property is 0.