Additions Preferences

To access this page:

  1. On the Tools menu, click Preferences. The Preferences dialog box appears.

  2. In the list on the left side of the dialog box, select Additions.

Use this page to load and start application plug-ins that are not part of the default installation of the application.

Available Plug-ins

This section contains two sub-panes: a table of plug-ins, and an editor pane for the plug-in that is selected in the table.

Insert new item ( [image]): Displays a Select a Plug-in dialog box, so you can select a file. When you click OK, information about the plug-in is added as a new row in the table. The following types of files can be opened as plug-in files:

  • A Python plug-in definition file, whose name ends with _plugin_definition.py.

  • A zip file that contains a plug-in definition file in its top level. The base name of the plug-in definition file must match the base name of the zip file.

  • A file whose name ends in .plugin, is a valid zip archive, and contains a plug-in definition file at its top level, whose base name matches the base name of the .plugin file.

Delete current item ( [image]): Removes the selected plug-in from the table.

Enabled: If checked, the plug-in is enabled, and can be started.

Path: The path to the plug-in definition file. Click Browse to navigate to and select a different file.

Start Plug-ins: Click to load and start the enabled plug-ins.

Related Topics:


Logger Tab

The Logger tab displays messages from the application, including the type, date, and time of the message. If the application does not behave as expected, especially with respect to generating data, check this tab to see whether an internal error occurred.

The following message types, in order of severity, may be used:

  1. DEBUG: A message of interest to programmers.

  2. INFO: High-level program status or progress information.

  3. WARNING: A message about problem involving data. This message type does not indicate a problem with the program's operation.

  4. ERROR: Information about an internal error. This message type usually indicates a bug in the program or a major configuration problem.

  5. CRITICAL: Information about an error so severe that it impairs the program's ability to continue, and may cause the program to exit (for example, running out of memory).

If you double-click an entry in the Logger tab, a Quality Agent dialog box appears, displaying the text of the message. This is useful for viewing long messages, such as Python traceback error messages, and for reporting errors to Enthought.

To clear all the entries in the Logger tab, right-click anywhere in the list of messages.

Messages are also written to a file, envisage.log, in your home directory. (On MS Windows, your home directory is typically C:\Documents and Settings\username.) When this file grows to about 1000 KB, it "overflows" to a back-up file, envisage.log.1; up to 3 back-up files are maintained, for a total of up to 4 MB of log entries for the current session.


Logger Preferences

To access this page:

  1. On the Tools menu, click Preferences. The Preferences dialog box appears.

  2. In the list on the left side of the dialog box, select Logger.

Use this preference page to set preferences for the operation of the Logger tab and the Quality Agent dialog box.

Logger Settings

Level: Select the level of messages to be logged. All messages at the selected level and higher levels of severity will be logged.

Quality Agent Settings

Enable quality agent: If checked, the Quality Agent dialog box can be opened from the Logger tab.

SMTP server: The mail server to use to send feedback e-mail messages.

From address: Default address to use in the From: header of feedback e-mail messages.

To address: Default address to use in the To: header of feedback e-mail messages.


Quality Agent Dialog Box

To access this dialog box: Double-click an entry in the Logger pane.

Use this dialog box to send feedback to the application developers.

Message: Contains the full text of the Logger entry.

Report Information

Subject: Type a summary of your message.

To: The address to send the message to. The default address sends it to the issue-tracking system for CP Lab.

Cc: Type an e-mail address for anyone else you wish to notify.

From: Type your own e-mail address.

SMTP Server: Enter the name of a mail server for your organization.

How critical is this issue? Select one of the following options:

  • Low: A minor problem, or one that has an easy work-around.

  • Medium: A problem where the program is not working as intended or expected.

  • High: A problem that significantly interferes with your ability to use the application, and has no work-around.

  • Critical: A problem that prevents you from using the application, and has no work-around.

Additional Comments: Type your comments about the program.

Include Workspace File: Select this to attach a copy of your current project to the e-mail message. If an error depends in some way on your specific data, attaching the project file helps developers reproduce the problem.

Send: Click to send an e-mail message.

Cancel: Click to close the dialog box without sending an e-mail message.

NOTE: The program sends an e-mail message only if your computer is connected to the Internet, and has access to the SMTP Server you select.


Workbench Preferences

To access this page:

  1. On the Tools menu, click Preferences. The Preferences dialog box appears.

  2. In the list on the left side of the dialog box, select Workbench.

Use this preference page to set preferences for the operation of the application.

Prompt on exit: If checked, the application asks for confirmation that you want to exit when you give an exit command.

Show tool names: If checked, labels are displayed for buttons on the main toolbar.


Import Item Dialog Box

To access this dialog box, do one of the following:

  • In a log plot, Column View, Synthetic Trace View, or Simulation View window, on the Plot menu, click Restore Template.

Use this dialog box to select and import plot templates.

This dialog box contains two panes: Preview and Repository.

Preview Pane

The Preview pane displays representation of the item that is selected in the Repository pane.

Repository Pane

The repository pane displays a hierarchy of repository folders and templates.

Select a template to display it in the Preview pane.

Click Import to import the selected template.


Repository Browser Pane

This pane appears in Import Item and Export Item dialog boxes.

Use this pane to work with the hierarchy of template repositories.

Toolbar

Icon | Operation | Description
 | Add a new repository root | Displays a New Repository Root dialog box, so you can define a repository root. This button is available only when the top-level Repository node is selected.
 | Create a new repository folder | Displays a New Folder dialog box, so you can define a new folder in a repository. This button is available only when a folder or root is selected to which you have write access.
 | Delete the selection | Displays a confirmation dialog to confirm that you want to delete the selected item. This button is available only when a root, folder, or template is selected to which you have write access.


Python View

The Python view contains an interactive Python interpreter.

Drag and Drop

You can drag and drop an object from elsewhere in the application (for example, a node from a navigation tree) onto the Python view to create a reference to the object in the interpreter.

Auto-completion

When you type a variable name followed by a period ("."), the Python interpreter pops up a list of all available attributes (including methods) on the object referenced by the variable.

As you type letters of the attribute name, the matching name is selected in the list. Press Enter to fill in the selected name in the current command.

You can also select a name to be filled in by double-clicking it with the mouse.

Key Bindings

Key Combination | Action
Home | Go to the beginning of the command or line.
End | Go to the end of the line.
Shift+Home | Select from the cursor to the beginning of the command or line.
Shift+End | Select from the cursor to the end of the line.
Ctrl+C | Copy selected text, removing prompts.
Ctrl+Shift+C | Copy selected text, retaining prompts.
Ctrl+V | Paste from clipboard.
Ctrl+Shift+V | Paste and run multiple commands from clipboard.
Ctrl+Up Arrow, Alt+P | Retrieve previous history item.
Ctrl+Down Arrow, Alt+N | Retrieve next history item.
Shift+Up Arrow | Insert previous history item.
Shift+Down Arrow | Insert next history item.
F8 | Command-completion of history item. (Type a few characters of a previous command and press F8.)
Ctrl+Enter | Insert new line into multiline command.
Ctrl+] | Increase font size.
Ctrl+[ | Decrease font size.
Ctrl+= | Default font size.


Component Library Browser Dialog Box

To access this dialog box, do one of the following:

  • On the main window toolbar, click View component library ( [image]). When the dialog box is accessed in this way, you can view components, but they are not applied anywhere.

  • In a Workflow Properties dialog box, click Add a new component ( [image]). The component you select in the Component Library Browser dialog box is added to the workflow.

  • In the ProAVA2 Explorer tab, right-click a column or layer node, point to New Property, and click Component. The component you select in the dialog box is added to the column or layer as a component property.

Use this dialog box to view and select script components.

Available Script Components: Displays names and descriptions of available components. Click a component to select it.

Inputs: Displays input parameters for the selected component.

Outputs: Displays output parameters for the selected component.

Code: Displays the code that defines the component.

You can change the width of columns in the Available Script Components, Inputs, or Output lists:

  1. Position the pointer over the edge of a column header (for example, between Name and Description). The pointer changes to a double-headed arrow.

  2. Drag the column boundary to adjust the column width.


Script Editing Window

To access this window:

  • Right-click the Global Scripts node or the Scripts node of a project and click New > Script on the shortcut menu.

  • Drag an existing script node from the ProAVA2 Explorer tab to the workspace.

This window enables you to type or edit a Python script file for use within ProAVA2. This window has 2 panes: an code pane and a metadata pane with sub-tabs for input and output parameters, and general information.

Code Pane

In the Code pane, type Python statements to create your script:

  • When you press Enter to create new lines, line numbers appear at the left edge of the window. These numbers are not saved as part of the script file.

  • You can move the text cursor and select and manipulate text just as you would in Notepad, or any other text editor. Press Ctrl+X to cut text, Ctrl+C to copy text, and Ctrl+V to paste text.

  • To save the script file, click Save, or click Save and Run to also execute the script.

Inputs and Outputs Tabs

The Input and Outputs tabs each contain two sub-panes, a table pane and an editor pane.

  • In the Inputs or Outputs table, click Insert new item ( [image]) to add a parameter.

The table columns and the editor boxes represent the same data about a parameter (but some columns may be hidden).

Name: The name of the parameter, which must be a valid Python identifier.

Description: A textual description of the parameter.

Default value: A value that should be used by the script if no value is provided for this parameter. This item is available only for input parameters.

Type: Select the datatype for the parameter.

Measure of: Select the type of quantity that the parameters values represent.

Unit system: Select the system of units that the parameter values will be converted to.

Visible: If selected, this parameter is displayed for the script in the Component Library Browser dialog browser.

When a parameter is selected in an Inputs or Outputs table, settings for the parameter appear in the corresponding editor sub-pane. specify input and output parameters, if any, for your script. This can be useful to pass values to or from other scripts or functions or to access model data, for example, when using the script in a function property of a layer, or as a step in a workflow.

General Tab

Name: The name of the script to display in the Component Library Browser dialog box.

Description: A textual description of what the script does.

Metadata:

This table can contain any metadata that you want to save along with your script. For example to make a script available for defining cases, add a metadata item with a Name of type and a Value of case_method.

Related Topics:


Workflow Properties Dialog Box

To access this dialog box: Double-click a workflow or case node under Workflows or Cases in the ProAVA2 Explorer tab.

Use this dialog box to change settings for workflows (a case is a type of workflow).

CAUTION: It is possible to construct a workflow that cannot be executed. An invalid workflow causes an error message when you try to open a Synthetic View or Simulation View window. It is a good idea to make a back-up copy of your project before changing a valid workflow.

Name: The name of the workflow.

Components: On the left side of the dialog box is a list of components that implement the workflow. Select a component name to display its parameters on the right side of the dialog box.

Inputs: The fields in this area vary, depending on the component selected. The field names are parameter names, and the values are literal values or variable names.

Outputs: The field in this area varies, depending on the component selected. The field name is a description of the output, and the field value is a variable name, which can be used in the input fields of other functions.

Buttons for components:

Button | Description
 | Displays the Component Library Browser dialog box, so that you can select a component to add to the workflow.
 | Deletes the selected component from the workflow.
 | Moves the selected component up in the function list.
 | Moves the selected component down in the function list.
 | Enables the selected component , if it is disabled.
 | Disables the selected component, if it is enabled.

Related Topics:


Adding Plug-ins to the Application

A plug-in is a small program that extends the functionality of a larger application. In the Envisage application framework, applications are constructed as a collection of plug-ins, layered on a minimal core program. Besides the plug-ins that make up the basic functionality of the application, you can add other plug-ins to gain other functionality.

Adding Available Plug-ins

  1. On the Tools menu, click Preferences. The Preferences dialog box appears.

  2. In the list on the left side of the dialog box, select Additions. The Additions preferences page is displayed on the right side of the dialog box.

  3. In the Additional Plug-ins table, click Insert new item ( [image]). A Select a Plug-in dialog box appears.

  4. Browse to and select a plug-in file, and click OK. The following types of files can be opened as plug-in files:

    • A Python plug-in definition file, whose name ends with _plugin_definition.py.

    • A zip file that contains a plug-in definition file in its top level. The base name of the plug-in definition file must match the base name of the zip file.

    • A file whose name ends in .plugin, is a valid zip archive, and contains a plug-in definition file at its top level, whose base name matches the base name of the .plugin file.

    A row is added to the table, and an editor for the item appears in the pane below the table.

Starting Available Plug-ins

Once you add a plug-in to the Additions preferences page, the information about it is saved and is loaded every time you run the application. However, this does not mean that the plug-in itself is loaded. You can add a variety of plug-ins to the page, and then each time you run the application, you can decide which plug-ins to load and start.

  1. For each plug-in that you want to start, select the plug-in in the table, and click Enabled in the editor pane.

  2. For each plug-in that you do not want to start, select the plug-in in the table, and click to clear Enabled in the editor pane.

  3. Click Start Plug-ins to start the enabled plug-ins.

Removing Available Plug-ins

If you no longer want a plug-in to be in available on the Additions preferences page, you can remove it from the table.

  1. Select the row for the plug-in in the table.

  2. Click Delete current item ( [image]). The plug-in is removed from the table.

NOTE: The plug-in is not deleted from the file system, and it is not stopped if it is already running. Plug-ins are stopped only when the application exits.


Changing a Workflow

You can change the following aspects of a workflow or case:

  • Parameter values for functions

  • Add or remove functions in the workflow

  • Enable or disable functions in the workflow

  • Change the order of functions in the workflow

CAUTION: It is possible to construct a workflow that cannot be executed. An invalid workflow causes an error message when you try to open a Synthetic View or Simulation View window. It is a good idea to make a back-up copy of your project before changing a valid workflow.

To change a workflow:

  1. Double-click a workflow or case node in the ProAVA2 Explorer tab. The Workflow Properties dialog box appears.

    • To change the inputs to a function, select the function on the left side of the dialog box, and edit the input values on the right side of the dialog box.

    • To add a function, click [image], and then select a function in the Component Library Browser dialog box.

    • To remove a function, select the function on the left side of the dialog box, and click [image].

    • To change the order of functions, click [image] to move the selected function up, and click [image] to move the selected function down. The functions execute in the order that they are listed.

    • To disable a function, select the function and click [image]. The word "(disabled)" appears next to the function name in the function list. Disabling prevents the function from executing, without removing it from the workflow definition.

    • To enable a disabled function, select it and click [image]. The word "(disabled)" disappears from next to the function name.

  2. Click OK when you are finished making changes.


Creating a Script

  1. Do one of the following:

    • To create a script only for a project, right-click the Scripts node of the project in the ProAVA2 Explorer tab.

    • To create a script available to all projects, right-click the Global Scripts node in the ProAVA2 Explorer tab.

  2. Click New Script on the shortcut menu. A script node appears under the node you original selected, with a default name (with .py appended) that is selected for editing.

  3. Type a file name for the script and press Enter.

    4. A script editing window appears. Project-specific scripts are created in the scripts subdirectory of the project's directory. Global scripts are created in root\lib\cp\plugin\proava2\scripts, where root is the directory of the ProAVA2 installation.

  4. Type Python statements in the script editing window to create your script.

    • When you press Enter to create new lines, line numbers appear at the left edge of the window. These numbers are not saved as part of the script file.

    • You can move the text cursor and select and manipulate text just as you would in Notepad, or any other text editor. Press Ctrl+X to cut text, Ctrl+C to copy text, and Ctrl+V to paste text.

    • To produce messages in the Output tab, use the following idioms in your script:

    from enthought.logging import logger

    logger.info("string")

    logger.debug("string")

    logger.warn("string")

    logger.error("string")

    logger.critical("string")

    logger.exception("Use this in an except block.")

    • To save the script file, press Ctrl+S.

  5. To specify input and output parameters for your script:

    1. On the Input or Outputs tab, click Insert new item ( [image]) on the table toolbar. A row is added to the table, and an editor for the parameter appears in the Editor sub-tab.

    2. Specify settings for the parameter.

    3. Repeat steps b and c for each input or output parameter of the script.

  6. To specify metadata for the script:

    1. Click the General tab.

    2. Enter a Name and Description for the script; these values will appear in the Component Library Browser dialog box.

    3. Optionally, click Insert new item ( [image]) on the Metadata table toolbar.

    4. Specify a Name and Value for the metadata item; this information is used to filter the components that appear in the Component Library Browser dialog box.

  7. Click Save to save the script.

  8. Click Cancel to close the script editing window.

Related Topics:


Importing a Script File

Importing a Script File into a Project

You can import any existing Python script file into a project. This operation copies the script file to the scripts subdirectory of the project directory.

  1. Right-click the Scripts node of a project, and click Import on the shortcut menu. An Open dialog box appears.

  2. Browse to and select a Python (.py) file to import. Click OK. A sub-node for the script appears under the project Scripts node.


Refreshing a Script List

The script nodes in the ProAVA2 Explorer tab represent script files located in the file system. The Global Scripts node lists script files in the directory root\apps\cplab\scripts, where root is the directory of the ProAVA2 installation. The Scripts nodes for a particular project lists the files in the scripts subdirectory of the project directory.

If you add or remove scripts in one of these directories from outside of ProAVA2, you might need to refresh the list of scripts for the node in the ProAVA2 Explorer tab.

  • Right-click the Global Script node or the Scripts node of a project in the ProAVA2 Explorer tab, and click Refresh on the shortcut menu. The children of the node are updated to reflect the current contents of the corresponding scripts directory.


Repositories

Repositories are locations where templates are stored. They support the following types of templates:

  • Shared: Created and maintained centrally for users in the organization.

  • Bundled: Provided with the application.

  • User-defined: Created and maintained by you, in a location to which you have access.

Repositories and the templates they contain are implemented as directories and files. Therefore, your access to them is determined by your access to the underlying file system. Typically, shared and bundled repositories are locations that you can read but not write. A user-defined repository that you create must be located in a part of the file system to which you have write access as well as read access.

You can work with repositories using a Repository pane in an Import Item or Export Item dialog box.

Creating a Repository Root

A repository root is the root directory for a repository.

  1. In a Repository pane, select the top-level Repository node.

  2. Click Add a new repository root ( [image]) in the pane's toolbar. A New Repository Root dialog box appears.

  3. Enter a user-friendly Name for the repository.

  4. Enter a Path to the directory that will be the repository root, or click Browse to open a Select a Directory dialog box, so you can select a directory.

  5. Click OK in the New Repository Root dialog box. The new repository root appears as a child folder of the top-level Repository node.

Creating a Repository Folder

  1. In a Repository pane, select a repository root or folder to which you have write access.

  2. Click Create a new repository folder ( [image]) in the pane's toolbar. A New Folder dialog box appears.

  3. Enter a user-friendly Name for the folder, and click OK. The new folder appears as a child of the folder you originally selected.

Deleting a Template or Folder

  1. In a Repository pane, select a folder or template to which you have write access.

  2. Click Delete the selection ( [image]) in the pane's toolbar. A confirmation dialog box appears.

  3. Click Yes to delete the item.


Running a Script in the Navigation Tree

To run a script from the navigation tree, right-click the script node and click Run on the shortcut menu.

When you run a script, the Python tab displays:

execfile(r"pathToScript")

If the script prints any output or produces an error message, it appears in the Python tab.


Table Editor Description

A table contains one or more columns and zero or more rows. You can set different values for each cell in the table. Some cells are text boxes; others may contain a drop-down list of items you can select.

You can sort a table based on the values in a column by clicking the label for that column. Each successive click sorts the table in the following order:

  1. Ascending order by the column's values.

  2. Descending order by the column's values.

  3. Not sorted by the column.

The toolbar of a table may contain the following buttons:

Icon | Action | Description
 | Do not sort columns. | Undo any sorting that has been applied.
 | Insert new item. | Insert a new row into the table.
 | Delete current item. | Delete the currently selected item from the table.
 | Set user preferences for table. | Displays a Select and Order Columns dialog box, which allows you to specify what columns appear in the table, and in what order.


Templates

Templates in ProAVA2 are predefined formats for plots. You can save a plot template and apply it to other sets of data than the one it was created with.

Importing Templates

Applying a template to a plot is called "importing the template.

  1. In a log plot, Column Log View, Synthetic Trace View, or Simulation View window, on the Plot menu, click Restore Template. The Import Item dialog box appears.

  2. If necessary, expand the folders for the repository location for the template you want to use.

  3. Select a template in the repository pane.

  4. Click Import to apply the plot template to the current plot.

Exporting Templates

  1. In a log plot, Column Log View, Synthetic Trace View, or Simulation View window, on the Plot menu, click Save Template. An Export Item dialog box appears.

  2. Select a folder in which to save the template.

  3. Type a File name for the template.

  4. Click Export.


Using Scripts

Within the application, you can execute Python scripts, as well as create scripts and save them with a project. Here are some of the ways you can work with scripts:

  • Add, remove, and run scripts on shortcut menus.

  • Create a script.

  • Run a script from the navigation tree.

  • Import a script file into a project.

  • Refresh a script node list.


Welcome

This help system documents dialog box that are implemented by Enthought libraries.


Working With Scripts on Shortcut Menus

You can attach a script to the shortcut menu for any node in the ProAVA2 Explorer tab.

Command | Description
Script name | Executes the specified script.
Add script to menu | Displays the Component Library Browser dialog box so that you can select a function or script. The name of the script is appended to the shortcut menu of the selected node.
Remove script from menu | Displays the Select scripts to remove dialog box. Select the label of the script you want to remove and click OK.

When you run a script, the Python tab displays:

execfile(r"pathToScript")

If the script prints any output or produces an error message, the output or error message usually appears in the Python tab.