Command Line Builder

Author: Optuma Team Last updated: Sep 1, 2022 13:43

Overview

Enterprise Services clients are able to use the Command Line Builder to easily create any number of command line print functions via a custom toolbar button. The text string generated can then be copied and used in a command prompt or Windows Task Scheduler, or simply click the button to run the command from inside Optuma.

This makes it very easy to build a series of complex command lines to publish scan results, symbol lists, or workbooks to PDF, CSV, Images, Web or Outlook email.

See this video for examples of building a command line and using with the Windows Task Scheduler:

To access the Command Line Builder, click on the + icon in the custom toolbar. In the menu that displays select the “Add Print Command” option.

Custom Toolbar Plus

In the window that opens, click the button next to Print Cmd

CLB9

The Command Line Print Builder window will open. The Command Line builder is broken into 5 main sections…

Output Format

CLB2
From this location you can set the type of output for the publish. By default PDF will be selected however the options available are:

  • PDF
  • Microsoft Word Document
  • Microsoft Powerpoint Slideshow
  • Optuma Web Publish Site
  • Comma Delimited Text File
  • Microsoft Outlook (email)
  • Images (added in v1.5)
  • Symbol List

CLB3
When an output option is selected which uses images, the image format can be selected as well (PNG, GIF, JPG).

If the output option includes unique options (email list, web settings, etc) the options will display below the main Output Format sections.

From Optuma v1.5 and later the output format of Images can be used for Scans via the CMD line print.

Source

CLB4
This section allows you to select the source for the publish. There are 4 main options available:

  • Workbooks - Each page in the workbook will be included in the output, including any Watchlists. Any workbooks contained in sub-folders under the primary workbook folder will also be available in this list.
  • Symbol Lists - This includes any manual symbol lists you have setup.
  • Scans - The scan will run, and the codes passing the scan will be included in the output.
  • Optuma Lists - Symbol Lists which are maintained by Optuma (S&P500, ASX 200, etc).

CLB5
Once the source type is selected a drop down list of available options will appear below.

Additionally any publish settings specific to the source type will be displayed in this section as well. For example if you select a workbook as the source, you will see checkbox options on whether to include:

  • Ratings
  • Journal Notes
  • Chart Annotations

Destination

CLB6
This section allows you to set a specific output path for the published file to go (if applicable) as well as to set a specific file name. Your default publishing path will be used unless another location is selected. You can check what the default path is set to by going to Settings - Folder Location Settings.

You will also be able to set how Optuma handles an existing file with the same name. It can either be overwritten, or a date / time stamp will be added to the end of the file name so the existing file remains unchanged.

Layout Options

CLB7
From this section you can select a number of options that will have an affect on the layout of the output file. For example you can specify a particular chart or page layout to use for each code in a Symbol List. Or you can select a Watchlist layout if a workbook containing a Watchlist has been selected.

Page Orientation (Landscape / Portrait), Font Size and the option to include an index page can also be set by this section.

Options which are not applicable to the output / source type, or haven’t been selected will appear greyed out.

Command Line Display

This final section is located along the bottom of the window and will display the command line that matches your selected source, output and layout options.

CLB8

To the right of the command line will be two buttons, one (left) to copy just the command line and the other (right) to copy the full path (which includes the Optuma.exe folder path).

  • Command Line Only: -pdf -wb “Example Setup” -out “C:\Publish” -filename “My_Daily_Report”
  • Full Path: “C:\Program Files\Optuma\Optuma.exe” -pdf -wb “Example Setup” -out “C:\Publish” -filename “My_Daily_Report”

In the Windows Command Prompt, if you copy the Command Line only option you must navigate to the Optuma folder to run it. With the full path you can run it from any location in the Windows Command Prompt.

Below the command line will be a series of advanced options:

  • Run in Background Instance of Optuma: This allows you to run the publish process while another copy of Optuma is open, or as a background process (so you see no Optuma windows open).

  • PDF per page: If PDF is selected as the output type you can specify how many charts are displayed per page. It will be 1 by default.

  • Hide Title Bar: Will hide the chart caption of the charts (Code, exchange, time frame, currency, etc).

  • Remove Footer: If the page includes a footer but you do not wish to include it in this publish you can check this box to hide it.

Once the command line is complete, click the Save button to add it to the toolbar. Clicking the button will run the command line as saved, or copy the text to paste in to the command prompt window or Task Scheduler.