Application.CommandLine Method |
The command line for BarTender to process.
Application.CommandLine(commandLineString)
Where commandLineString contains the command-line arguments for the application to process.
Version |
BarTender 7.00 or higher |
Edition |
Automation, Enterprise |
BarTender supports automation through the use of command-line parameters. Command-line parameters are most commonly used to change BarTender settings, preload an existing BarTender document, or automatically start a print job. A single command line can contain one or more command-line parameters, so command parameters can be grouped.
Each call to the CommandLine method puts a command line into a command processing queue that is internal to BarTender and then immediately returns. BarTender then runs each command line sequentially in the order in which they were placed in the queue. Several command lines can be submitted, so the caller can stack multiple command lines to be run. BarTender always processes a command line in the order in which it was placed in the command processing queue.
The OnCommandLineCompleted event fires for each command line that BarTender runs. If the /P argument is passed to the application, events can be hooked up to monitor the print job's progress.
For more information about the command line parameters that you can use to automate BarTender, refer to
'Declare a BarTender application variable
Dim btApp As BarTender.Application
'Create a new instance of BarTender
btApp = New BarTender.Application
'Run a command line to print test.btw
btApp.CommandLine("c:\temp\test.btw ?/p")
'End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
// Declare a BarTender application variable
BarTender.Application btApp;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Run a command line to print test.btw
btApp.CommandLine(@"c:\temp\test.btw ?/p");
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
Related Topics