FormatSetup Command Tag

ClosedDescription

Allows you to load or set up a BarTender document prior to using another command.

CSV Text database functionality applies to the <Print> Command, but it does not apply to the <FormatSetup> Command.

ClosedSyntax

<FormatSetup>...</FormatSetup>

ClosedChild Elements

The following child element tags are supported:

Tag

Required/Optional

Description

Format

Optional

Sets the BarTender document being printed.

LicenseServer

Optional

Sets BarTender's license server options.

MediaHandling

Optional

Sets BarTender's media handling options.

NamedSubString

Optional

Sets the name of a data source on a template and its value.

PrintSetup

Optional

Sets the document's print options.

QueryPrompt

Optional

Sets the query prompt options.

RecordSet

Optional

Sets how BarTender uses record set data. NOTE: The <TextData> tag does not apply to the <FormatSetup> Command.

ClosedResponse

Each time a <FormatSetup> command is passed to BarTender, an XML response is generated. This response contains user, server and command information followed by the <FormatSetup> command as an empty element tag: <FormatSetup/>. The closing tags for command and the response follow. In the example below, the <FormatSetup> command opened the document Document1.btw and set a number of options including setting the number of serial numbers to 50, and the number of copies to two. If you run the example using BarTender's Run BTXML menu option, the following response is generated:

<?xml version="1.0" encoding="utf-16"?>

<Response AppName="BarTender" AppInstanceGUID="(5EFC7975-14BC-11CF-9B2B-00AA00573819)" Name="09232006_103601_Job1" Version="2.0" ID="123" AppVersion="9.00">

<User>Administrator</User>

<Server>MyServer</Server>

<Command Name="Job2">

<FormatSetup/>

</Command>

</Response>

BarTender will open and display the document identified in the <Format> tag. If you open the Print dialog, the print options will be set according to the values supplied in the BTXML Script. The document is essentially ready for the <Print> command.

ClosedParent Tag

<Command>

ClosedExample

<?xml version="1.0" encoding="utf-8"?>

<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">

<Command Name="Job1">

<FormatSetup>

<Format>Document1.btw</Format>

<PrintSetup>

<NumberSerializedLabels>50</NumberSerializedLabels>

<IdenticalCopiesOfLabel>2</IdenticalCopiesOfLabel>

<Printer>HP LaserJet</Printer>

<AutoPrintAgain>true</AutoPrintAgain>

<EnablePrompting>true</EnablePrompting>

<RecordRange>1-5</RecordRange>

<UseDatabase>true</UseDatabase>

<PaperTray>Tray1</PaperTray>

<Performance>

<AllowFormatCaching>true</AllowFormatCaching>

<AllowGraphicsCaching>true</AllowGraphicsCaching>

<AllowSerialization>true</AllowSerialization>

<AllowStaticGraphics>true</AllowStaticGraphics>

<AllowStaticObjects>true</AllowStaticObjects>

<AllowVariableDataOptimization>false</AllowVariableDataOptimization>

<WarnWhenUsingTrueTypeFonts>true</WarnWhenUsingTrueTypeFonts>

</Performance>

</PrintSetup>

</FormatSetup>

</Command>

</XMLScript>

ClosedRequirements

BTXML Script version 2.0 (BarTender 9.0 and higher)

Related Topics