1.2.1. CCL Structure

The configuration files contain CCL objects that control the appearance and behavior of menus and buttons that appear in the Ansys CFX Launcher. There are three types of CCL objects: GROUP, APPLICATION and DIVIDER objects. The fact that there are multiple configuration files is not important; applications in one file can refer to groups in other files.

An example of how to add a menu item for the Windows calculator to the launcher is given in Example: Adding the Windows Calculator.

1.2.1.1. GROUP

GROUP objects represent menus and toolbar groups in the Ansys CFX Launcher. Each new GROUP creates a new menu and toolbar. Nothing will appear in the menu or toolbar until you add APPLICATION or DIVIDER objects to the group. An example of a GROUP object is given below:

GROUP: CFX
  Position = 200
  Menu Name = &CFX
  Show In Toolbar = Yes
  Show In Menu = Yes
  Enabled = Yes
END
  • The group name is set after the colon. In this case, it is "CFX". This is the name that APPLICATION and DIVIDER objects will refer to when you want to add them to this group. This name should be different to all other GROUP objects.

  • Position refers to the position of the menu relative to others. The value should be an integer between 1 and 1000. Groups with a higher Position value, relative to other groups, will have their menu appear further to the right in the menu bar. Referring to Figure 1.1: Ansys CFX Launcher, CFX has a lower position value than the ANSYS group. The File and Edit menus are always the first two menus and the Help menu is always the last menu.

  • The title of the menu is set under Menu Name (this menu has the title CFX). The optional ampersand is placed before the letter that you want to have act as a menu accelerator (for example, Alt+C displays the CFX menu). You must be careful not to use an existing menu accelerator.

  • The creation of the menu or toolbar can be toggled by setting the Show in Menu and Show in Toolbar options to Yes or No respectively. For example, you may want to create a menu item but not an associated toolbar icon.

  • Enabled sets whether the menu/toolbar is available for selection or is disabled. Set the option to No to disable it.

1.2.1.2. APPLICATION

APPLICATION objects create entries in the menus and toolbars that will launch an application or run a process. Two examples are given below with an explanation for each parameter. The first example creates a menu entry in the Tools menu that opens a command line window. The second example creates a menu entry and toolbar button to start CFX-Solver Manager.

APPLICATION: Command Line 1
  Position = 300
  Group = Tools
  Tool Tip = Start a window in which CFX commands can be run
  Menu Item Name = Command Line
  Command = <windir>\system32\cmd.exe
  Arguments = /c start
  Show In Toolbar = No
  Show In Menu = Yes
  Enabled = Yes
  OS List = winnt
END
APPLICATION: CFXSM
  Position = 300
  Group = CFX
  Tool Tip = Launches Ansys CFX-Solver Manager
  Menu Item Name = CFX-Solver Manager
  Command = cfx5solve
  Show In Toolbar = Yes
  Show In Menu = Yes
  Enabled = Yes
  Toolbar Name = Ansys CFX-Solver Manager
  Icon = LaunchSolveIcon.xpm
  Shortcut = Ctrl+S
END
  • The application name is set after the colon, in the first example it is "Command Line 1". This name should be different from all other APPLICATION objects.

  • Position: sets the relative position of the menu entry. The value should be an integer between 1 and 1000. The higher the value, relative to other applications that have the same group, the further down the menu or the further to the right in a toolbar the entry will appear. If you do not specify a position, the object assumes a high position value (so it will appear at the bottom of a menu or at the right of a group of buttons).

  • Group: sets the GROUP object to which this application belongs. The value must correspond to the name that appears after "GROUP:" in an existing GROUP object. The menu and/or toolbar entry will not be created if you do not specify a valid group name. The GROUP object does not have to be in the same configuration file.

  • Tool Tip: displays a message when the mouse pointer is held over a toolbar button. In the "Command Line 1" example above, the Tool Tip entry is not used because a toolbar button is not created. This parameter is optional.

  • Menu Item Name: sets the name of the entry that will appear in the menu. If you do not specify a name, the name is set to the name of the APPLICATION: object. The optional ampersand is placed before the letter that you want to have act as a menu accelerator (for example, Alt+C then S will start CFX-Solver Manager. Alt+C selects the CFX menu and S selects the entry from the menu). You must be careful not to use an existing menu accelerator.

  • Command: contains the command to run the application. The path can be absolute (that is, use a forward slash to begin the path on Linux, or a drive letter on Windows). If an absolute path is not specified, a relative path from <CFXROOT>/bin/ is assumed. If no command is specified, the menu item/toolbar button will not appear in the Ansys CFX Launcher. The path and command are checked when the launcher is started. If the path or command does not exist, the menu item/toolbar button will not appear in the launcher. You may find it useful to include environment variables in a command path; for details, see Including Environment Variables.

  • Arguments: specifies any arguments that need to be passed to the application. The arguments are appended to the value you entered for Command. You do not need to include this parameter as there are no arguments to pass. You may find it useful to include environment variables in the arguments; for details, see Including Environment Variables.

    Distinct arguments are space-separated. If you need to pass an argument that contains spaces (such as a Windows filepath) you should include that argument in double quotes, for example:

    Arguments = "C:\Documents and Settings\User" arg2 arg3

  • Show In Toolbar: determines if a toolbar button is created for the application. This optional parameter has a default value of Yes.

  • Show In Menu: determines if a menu entry is created for the application. This optional parameter has a default value of Yes.

  • Enabled: controls the menu entry and toolbar button. Set this parameter to No to disable the application. This optional parameter has a default value of Yes.

  • OS List is an optional parameter that enables you to set which operating system the application is suitable for. If OS List is not supplied, the launcher will attempt to create the menu item and toolbar button on all platforms.

    For example, the command to open a command line window varies depending on the operating system. In the ‘Command Line 1’ example above, the application only applies to Windows platforms. To complete the OS coverage, the launcher configuration files contain more ‘Command Line’ applications that apply to different operating systems.

  • Toolbar Name: sets the name that appears on the toolbar button. This parameter is optional (because you may want to show only an icon).

  • Icon: specifies the icon to use on the toolbar button and in the menu item. The path can be absolute (that is, use a forward slash to begin the path on Linux, or a drive letter on Windows). If an absolute path is not specified, a relative path from <CFXROOT>/etc/icons is assumed. The following file formats are supported for icon image files: Portable Network Graphics (png) and Pixel Maps (ppm, xpm). Other icons used in the launcher are 32 pixels wide and 30 pixels high. This parameter is optional. If it is not included, an icon will not appear.

  • Shortcut: specifies the keyboard shortcut that can be pressed to launch the application. You must be careful not to use a keyboard shortcut that is used by any other APPLICATION object.

1.2.1.2.1. Including Environment Variables

In can be useful to use environment variables in the values for some parameters. You can specify an environment variable value in any parameter by including its name between the < > symbols. In the ‘Command Line 1’ example above, <windir> is used in the Command parameter so that the command would work on different versions of Windows. <windir> is replaced with the value held by the windir environment variable. The Command and Argument parameters are the only parameters that are likely to benefit from using environment variables. Environment variables included in the Arguments parameter are expanded before they are passed to the application.

1.2.1.3. DIVIDER

DIVIDER objects create a divider in a menu and/or toolbar (see the Tools menu for an example). An example of the CCL for DIVIDER objects is shown below.

DIVIDER: Tools Divider 1
  Position = 250
  Group = Tools
  OS List = winnt
END

The Position, Group and OS List parameters are the same as those used in APPLICATION objects. For details, see APPLICATION.