To create an element for a command line tool select either Actions ‣ Create element with command line tool in the main menu or the following icon on the toolbar:
<center> <img src="/wiki/download/attachments/2097199/external_cmd_tool.png"/> </center>
The Create Element with Command Line Tool wizard appears. On the first page of the wizard input a name and a description of the element in the Property Editor. Letters, numbers and underscores are allowed in the name.
<center> <img src="/wiki/download/attachments/2097199/create_elt_cmd_p1.png"/> </center>
On the second page add the required input and output data:
<center> <img src="/wiki/download/attachments/2097199/create_elt_cmd_p2.png"/> </center>
For each input or output you should:
On the third page of the wizard you can add attributes for the command line tool. Later you would be able to set values for the attributes in the Property Editor, i.e. the attributes are actually the parameters of the new element.
<center> <img src="/wiki/download/attachments/2097199/create_elt_cmd_p3.png"/> </center>
For each attribute added you should:
On the last page of the wizard you should input the execution string, i.e. the command that would be executed.
<center> <img src="/wiki/download/attachments/2097199/create_elt_cmd_p4.png"/> </center>
The signature of the execution string depends on the command that is launched. But the general rule is that input/output data and attributes have prefic $. For example let there be some perl script “myScript.pl” that accepts an input file as the first attribute and accepts the second attribute denoted as “param1”. The command may look as follows:
perl [path_to_script]myScript.pl $infile $param1 > $outfile
Here infile and outfile are input and output data set on the step 2, param1 is an attribute set on the step 3.
On the same wizard page you can optionally input the description of the element. It would be shown on the element on the Scene. The description can be parameterized. This means that if you input e.g. an attribute name (with prefix $), the name on the element would be substituted with the value of the corresponding parameter.
For example input the following parameters:
<center> <img src="/wiki/download/attachments/2097199/create_elt_cmd_p4_filled.png"/> </center>
The element created looks as follows:
<center> <img src="/wiki/download/attachments/2097199/elt_cmd_on_scene.png"/> </center>