Canvas > Using Canvas > Starting Canvas from a Command Line

Starting Canvas from a Command Line

Canvas supports a command-line interface to open the application or to open a specific screen from either a CygNet BSS folder or a local folder.

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]

 

Note: Command-line commands 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

-Source

No

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

  • BSS — Indicates that the file is stored in a CygNet APPS or BSS folder
  • Local — Indicates that the file is stored in a local or network Windows file-system folder

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

Examples

-Source=BSS

-Source=Local

-Path

Yes

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

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"

-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 command-line options 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=Local -Path="D:\Screens\MyChart.can"

 

Note: The Canvas Find and Replace command-line parameters cannot be combined with parameters describe above. See that topic for more information about using the command line to search and replace strings in your Canvas screen .xml files.


Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.