CARIS Batch Utility : Introduction : Overview
 

Overview

The CARIS1 Batch utility runs command-line processes on marine products generated from CARIS applications.

CARIS Batch is installed in the \Bin folder of a CARIS application. For a complete list of CARIS processes, see A batch script calling carisbatch.exe, should test the exit code. See the following example..

The basic syntax for carisbatch is shown below:

carisbatch --run <process_name> <parameters> <input> <output>

The -r key or --run parameter is required to run a process.

Processes are bound by the following rules:

Parameters are identified either by character keys or parameter names. Keys use a single-hyphen prefix (-h) and parameter names use a double-hyphen prefix (--help).

Values are separated from parameters by a space (e.g. -n 6).

Parameter values with spaces must be enclosed in quotation marks (e.g. -c "New DSID Comment").

Process names are not case-sensitive, but parameter names are. Be careful when entering parameters.

Parameters are case-sensitive. Check the help message to determine parameter settings.

Information about CARIS Batch or individual processes is available. See the following table.

Parameter

 

Long

Short

Description

--help

h

Print the help, including available options.

Example: carisbatch --run <process_name> ‑‑help

--list-processes

l

Print the list of available processes.

--run

r

Run a process.

--verbose

v

Print verbose messages.

--version

Print the executable version and copyright information, including the version of modules.

--set-option

Set an application option. This is similar to defining options in the application using Tools > Options. You must provide the full option name followed by the desired value. If the value is a file, the full path and name of the file must be specified.

--get-option

Get an application option. This will return the current value of a specified option.

--list-options

List all application options. This provides a list of all options that can be defined, the name used to define them via CARIS Batch and their current values.

--validate-options

Validate the application options. This ensures that all values defined for the application options are valid.

Input can be either a file or a URI-based data store. Output can also be to a file or database.

File paths with spaces must be enclosed in quotation marks. For example, "C:\Directory Name\Sample File". Otherwise, the path and name can be entered without quotation marks. For example, C:\DirectoryName\SampleFile.

A universal resource identifier (URI) is required to access a database.

If BDB input is a coverage in a database, it can be specified with a URI to the coverage:

bdb://user:password@servername/databasename/boid,

where:

bdb:// identifies a Bathy database

user:password@servername is the connection string to the BDB node manager

databasename/boid is the path to the coverage (CSAR)

For example:

bdb://dba:sql@server2012machine1/databasename/02000001.

Run CARIS Batch

CARIS Batch is run from the Command Prompt window. In order to ensure the environment is setup correctly, you can:

start the command prompt from the Start menu, CARIS > (application) (version) > (application) (version) Command Prompt, or

start any command prompt and run the environment batch script in the install directory e.g. C:\Program Files\CARIS\<application>\<version>\system\caris_env.bat, or

start the command prompt from the CARIS utilities toolbar

To use the utilities toolbar, open a CARIS application and go to View > Toolbars > Utilities. Select Show command prompt from the toolbar drop down list. Click the play button to run the utility.

1. Open the Command Prompt window.

2. Type carisbatch --run followed by the process and parameters.

3. Press <Enter>

The selected process is run.

The processes available in CARIS Batch differ based on the application from which the command prompt was launched and the modules enabled in the application.

Defining Environment Settings

Some processes access the environment settings of the application when processing data. These settings are normally defined using Tools > Options in the application, but options are also provided in CARIS Batch to view and edit the environment settings without needing to launch the application.

To edit environment settings:

1. Run the ListOptions command to determine the names of the environment settings and their current values.

carisbatch --list-options

2. In the resulting list, locate the setting you wish to define.

3. Run the SetOption command, specifying the name and value of the option you want to define.

In the example below, the Catalogue Control option under the Files and Folders category is being changed to point to a custom catalogue control file.

carisbatch --set-option FilesAndFolders/Files/CatalogueControl "C:\Users\ljacquard\AppData\Roaming\CARIS\BASE Editor\5.1\customcataloguecontrol.xml"

4. [Optional] Run the ValidateOptions command to ensure that the changes were implemented correctly.

carisbatch --validate-options

If there are no erros, a message will be returned stating that all options are valid.


1 This term is a trademark of Teledyne CARIS, Reg. USPTO and CIPO.