This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Share a Configuration for Multiple Models

With configuration references, multiple models can share a configuration set. To share a configuration set between models, store the configuration set as a configuration set object in the base workspace. Then create a configuration reference in your model that references the configuration set object. You can create configuration references in other models that also point to the same configuration set object.

    Note:   Before saving and closing your models, follow the instructions to Save a Referenced Configuration Set. If you do not save the referenced configuration set from the base workspace, when you reopen your model, the configuration reference is unresolved.

Convert an Existing Configuration Set to a Configuration Reference

To convert an existing configuration set in your model to a configuration reference:

  1. Open the Model Explorer.

  2. In the Model Hierarchy pane, right-click the active configuration set to share.

  3. In the configuration set context menu, select Convert to Configuration Reference, which opens a dialog box. Alternatively, you can right-click the model node and select Configuration > Convert Active Configuration to Reference.

  4. In the Convert Active Configuration to Reference dialog box, use the default configuration set object name, configSetObj, or type a name.

  5. Click OK, which creates a configuration reference in the model and a configuration set object in the base workspace. The configuration reference points to the configuration set object, which has the same values as the original active configuration set. The configuration reference name in the Model Hierarchy is now marked as (Active).

  6. To change the name of the configuration reference, select it in the Model Hierarchy, and in the right pane, change the Name field.

Create a Configuration Reference in Another Model

To share the preceding configuration set, which is stored as configSetObj in the base workspace, create a configuration reference in another model:

  1. In the Model Hierarchy pane, right-click the model node.

  2. In the context menu, select Configuration > Add Configuration Reference.

  3. The Create Configuration Reference dialog box opens. Specify the name of the configuration set object, configSetObj, in the base workspace.

  4. To make the new configuration reference the active configuration, in the Model Hierarchy, right-click the configuration reference. In the context menu, select Activate.

Both models now contain a configuration reference that points to the same configuration set object in the base workspace. To set up your model to automatically load the configuration set object, see Callbacks for Customized Model Behavior.

Related Examples

More About

Was this topic helpful?