The Recipe Package consists of the following programs:
- The Recipe Builder
- The Recipe Download system task
- The Recipe Upload system task
Each of these programs allows you to specify command line parameters that allow you to start each program with preset values.
You can specify command line parameters in the Task Configuration dialog box of the SCU. This dialog box enables you to configure which programs iFIX automatically starts. Refer to the Setting up the Environment manual for more information on this dialog box.
You can also specify command line parameters using the Program block's RUNTASK command in the iFIX Database Manager, using the Shell function in a Visual Basic for Applications (VBA) script.
When using command line parameters with the Program block or in the Command Language Editor, use the following general syntax:
RUNTASK app_nameparameter
For example, to download a control recipe, use this command:
RUNTASK RCPDOWN /ccontrol_recipe
When using VBA, use scripts similar to the following:
Private Sub FixEvent1_OnTrue()
Dim download As String
Dim return_value As Double
download = System.ProjectPath + "\RCPDOWN" + " /cRCPFILE /e"
return_value = Shell (download, 0)
End Sub
To create an upload script, define a variable called upload in place of the download variable and substitute the reference to RCPDOWN with RCPUP as follows:
upload = System.ProjectPath + "\RCPUP" + "/cRCPFILE /e"
Using Multiple Parameters in VBA
When using multiple command line parameters in VBA, separate each parameter with a space. For example, to specify the Error File parameters to the Recipe Download system task for a control recipe, use the following command line:
download = System.ProjectPath + "\RCPDOWN" + " /cBeer /e"
Under Windows, you can also specify a command line parameter using the operating system's Run command. To learn how to use this command, refer to your Windows documentation.
If you mistype the command line for the Recipe Download and Recipe Upload system tasks, the programs abort. On the other hand, if the command line for the Recipe Builder contains errors, a blank, untitled recipe opens.
The remainder of the chapter describes each command line parameter. Refer to these sections for more information.