Calling Macros enables you to use standardized sequences of procedural
code several times in the same Program or in different Programs. To call a
Macro, you must select it in the -CP Lines tab and assign
values to its parameters, if this Macro is parameterized.
To add a Macro call, you must:
- Open the-CP Lines tab of a Program. To do
so, select a Program in the Design explorer view of the Design perspective
and double-click on it or select Open in the popup
menu. Then access its -CP Lines tab from the Overview tab
or directly by clicking the -CP Lines tab.
- Click the Add Macro... button. A selection
box opens up with the list of the Macros already present in the location.
- If the Macro you want to call is displayed in this selection
box, just click on its corresponding checkbox.
- If it is not displayed, just click on the New Macro button
in the selection box. In the creation wizard which opens up, enter the name
and label of a new Macro and click OK. The new Macro
is then displayed in the selection box. If you select it and click OK,
it will be called in the -CP Lines.
- If the Macro is parameterized, you must assign values to its parameters.
To assign a value:
- Select a Macro call in the left area of the tab.
- In the Parameters table of the -CP
Line Definition section, select the line of the appropriate parameter.
Double-click in the Value column.
- Select another line in the table to display the new parameter/value
on the Macro call line.