CopyPlanningEngine macro
The CopyPlanningEngine macro is used to create a copy of the existing Planning Engine. This macro is executed at system level.
For executing the macro, the value of the Command field must be specified in this format:
CopyPlanningEngine([Source Planning Engine name], Planning Engine Name, [Planning Engine Display Name], [Category],[Stop on End Status], [Cycle]).
This table lists the parameters used to execute the CopyPlanningEngine macro:
Parameter Name | Description |
---|---|
Source Planning Engine name |
The source Planning Engine based on which the new Planning Engine is to be created. Allows application variables and ‘%planningengine%’ parameter variable. Note: The %planningengine% parameter variable must be used only
if the macro runs through the job scheduler or within the context of a planning
engine on the Planning Engine Detail screen. Else, the
%planningengine% variable cannot be replaced.
|
Planning Engine name |
The name of the Planning Engine to be created. Allows variables such as %pesource%, %planningengine%, %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. For example, Weekly Supply_%date%, can be used to create a Planning Engine "Weekly Supply_20200327". Note:
To view the list of available parameter variables, See Analysis Cycle parameter variables. |
Planning Engine Display name |
The display name of the Planning Engine to be created. Allows variables such as %planningengine%, %pesource%, %date%, %time%, %datetime%, %PlanningEngineCycle% and application variables. For example, Weekly Supply_%date%, can create Planning Engine "Weekly Supply_20200327". Note:
To view the list of available parameter variables, See Analysis Cycle parameter variables. |
Category |
The category name of the Planning Engine to be created. Note: If this value
is not specified, the category defined for the source Planning Engine is
used.
|
Stop on End Status |
Stop on End Status decides the status of the macro which cause the macro to stop. Stop on End Status can be set as specified:
|
Cycle |
The name of the cycle where the planning engine is to be copied. When specified, the master planning engine for the specified cycle is copied. Allows application variables and the %planningenginecycle% parameter variable. Note:
|
This table lists the examples of the CopyPlanningEngine macro:
Requirement | Syntax |
---|---|
Make a copy of "Weekly Supply Plan 2020-03-17" called "Weekly Supply Plan 20200324" (where 20200324 is today's UTC date) with the same category of the source. The display name of the planning engine is set to null. | CopyPlanningEngine("Weekly Supply Plan 2020-03-17","Weekly Supply Plan %date%","","","","") |
Make a copy of the Master planning engine for "SCO" cycle. The new planning engine is called "baseline" with the same category of the source. The display name of the planning engine is set to null. | CopyPlanningEngine("","baseline","","","","SCO") |