Specifying parameters in a macro, Example 3: factory macro with two parameters, Typing macro names that contain spaces – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual
Page 642: Example 4: macro name with spaces and parameters
F
ACTORY
T
ALK
V
IEW
S
ITE
E
DITION
U
SER
’
S
G
UIDE
24–14
• •
•
•
•
Specifying parameters in a macro
Macros can accept up to nine parameters. To specify a parameter in a macro, type a
percent (%) sign followed by a number.
To run the macro and parameters, specify the macro name followed by the parameters.
Separate multiple parameters with spaces.
Example 3: Factory macro with two parameters
Re-create the Factory macro described in Example 1, as follows:
Display Overview
Display %1
Valve23=%2
To run the macro, type the macro name with the parameters to substitute for the
placeholders %1 and %2:
Factory Detail Open
When the macro runs, it substitutes Detail wherever %1 occurs in the macro, and
substitutes Open wherever %2 occurs in the macro.
The actions performed are the same as in Example 1. However, in this example the macro
runs in the home area instead of the Ingredients area.
Typing macro names that contain spaces
If the name of a macro contains spaces, enclose the name in quotation marks when typing
the macro name. If the macro contains parameters, place the parameters outside the
quotation marks.
Example 4: Macro name with spaces and parameters
The name of the macro in Example 3 is Factory Display, instead of Factory. To run the
macro, type the following at the command line:
“Factory Display” Detail Open