Starting Canvas from a Command Line

Canvas supports a command-line interface (CLI) to open a specific screen from either an APPS or BSS folder or a local or network file-system folder. Domain ID support is also available to override the ambient domain when starting the application via the command line.

To open Canvas via command-line

  1. Open a Command Prompt window.
  2. Navigate to the directory where the application is installed, typically CygNet\Bin.
  3. Type the desired command using the syntax described below.

Usage

Canvas -Source=[BSS|Local] -Path=[Canvas screen file path] -Domain[DomainId]

 

Note: CLI parameters are not case sensitive.

Parameters

Some parameters require additional data, if required, follow each parameter with =additional data. See Usage and Examples for more information.

Parameter Required Description

-Path

Yes

Specify the path to the file you want to open wrapped in quotation marks. Options include an APPS or BSS folder or a local or network file-system folder.

The -Path parameter is required when opening a screen. The -Path parameter can be used without the -Source parameter. If no -Source parameter is specified, it is assumed to be local.

Note: Do not use -Files to specify the path to a file. The presence of both -Files and -Path invalidates a command line. The -Files parameter is used with Find and Replace.

Examples

-Path="CygDemo.BSS\Canvas\MyScreen.can"

-Path="C:\Screens\MyChart.can"

-Source

No

Specify the source type for the file you want to open. Options include:

  • BSS — Indicates that the file is stored in an APPS or BSS folder
  • Local — Indicates that the file is stored in a local or network file-system folder. Not supported by TWC

The -Source parameter is optional, and if not specified, the -Source is assumed to be local.

Examples

-Source=BSS

-Source=Local

-Domain

No

Specify a CygNet domain ID to override the ambient domain. The -Domain parameter is optional, and if not specified, the ambient domain is used for all screens and data displayed.

Example

-Domain=5488

-Help

No

Displays a dialog box showing command-line usage. "help", "\help", "/help", and "?" are also valid.

The Command Line Usage dialog box will be displayed when any invalid options are typed at the command line.

Examples

canvas help

canvas.view help

canvas.view.lite help

canvas ?

canvas.view ?

canvas.view.lite ?

canvas /help

canvas.view /help

canvas.view.lite /help

Command-Line Usage

You can get user assistance for the relevant CLI parameters for Canvas.

Command-line help for Canvas

Type "canvas help" at the command-line prompt to see usage tips

Examples

C:\CygNet\Bin>Canvas

 

C:\CygNet\Bin>Canvas help

 

C:\CygNet\Bin>Canvas MyChart.can

 

C:\CygNet\Bin>Canvas -Source=BSS -Path="CYGDEMO.BSS\Screens\MyChart.can"

 

C:\CygNet\Bin>Canvas -Source=BSS -Path="CYGSITE2.BSS\SCREENS\MyOtherChart.can" -Domain=5488

 

C:\CygNet\Bin>Canvas -Source=Local -Path="D:\Screens\MyChart.can"

 

Note: The Canvas Find and Replace CLI parameters cannot be combined with parameters describe above. See Using Find and Replace from a Command Line for more information about using the command line to search and replace strings in your Canvas screen .xml files.

Other Canvas Applications

To start the other Canvas applications from a command line, see: