RunProductionSchedulingMacro

RunProductionSchedulingMacro is used for calling the back end Production Scheduling client which supports parameterized model name and Production Scheduling client macro name to indicate the client action to be executed. This macro command is executed at system level.
These parameters are used for the macro:
Model Name
The Production Scheduling model name context to execute the macro. This supports %modelcontext% parameter which is substituted by the current Production Scheduling model when executing macros within the Production Scheduling 'module' (Production Scheduling model details).
Macro Name
The macro name within Production Scheduling Model.

For executing the macro, the value for the Command field must be specified in this format: RunProductionScheduling(Model Name, Macro name)

On macro execution, the status is changed to ‘Running’ to indicate that the macro is being processed. The status is changed to ‘Completed’ when the process is completed.

Table 1. Example
Requirement Parameters
Delete Batched and Create new schedule within the model: ModelA of Advanced Scheduling RunProductionSchedulingMacro("ModelA","Schedule")
Import test data from M3 within model QACFBDEV02_TST of Advanced Scheduling RunProductionSchedulingMacro("QACFBDEV02_TST","Import M3 Test Data")
Validations are performed when you execute the macro. If any of the validation fails, the macro execution is aborted and the related error message is displayed. This table describes the error message displayed during the macro execution:
Validation Condition Error Message
Check production scheduling model name exists Model with name {0} does not exist or is not accessible by the current user
Check the production scheduling macro name exists Macro with name {0} cannot be found in Production Scheduling model {1}