You are here: Hierarchical Modeling > Scenario Parameters in External Submodels

Scenario Parameters in External Submodels

When defining scenario parameters, a list of possible parameters for the parent model is listed in the Scenario Parameters dialog.  If you would like to define a scenario parameter for an external submodel (i.e. in a separate Visio document), you must first define a macro or global variable in both the parent model and external submodel, then use the macro or variable in a field in the submodel where you would like to apply the scenario parameter, and finally set the macro or variable as a scenario parameter in the parent model.

Note: If your submodel is on another page within the same document as your main model, there is no need to use this technique because elements are global across all pages within the same document.

Example

For example, if we would like our external submodel to use a scenario parameter for one of its activity's (Op31) capacity, we would do the following:

  1. Define a macro in the parent model, and set its initial value to 1.  For this example we will call the macro Op31Cap.

  1. Define the same macro in the external submodel. Set the initial value of the variable to 1. This must be done so the submodel accepts the macro in the capacity field.
  2. Open the Properties window for activity Op31 in the external submodel, and type the macro name in the activity Capacity field or right-click and select it from the context menu.

  1. Open the Scenario Manager in the parent model and click the Add Parameters button.

  1. Expand the Macro folder, and double-click on the Op31Cap macro to add it as a scenario parameter.

  1. The macro can now be used as a scenario parameter to control capacity for activity Op31 in the external submodel.

© 2019 ProModel Corporation • 705 East Timpanogos Parkway • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com