Main Content

Root Inport Mapping Scenarios

Use the Root Inport Mapper tool to create scenarios, save scenarios, and load previously saved scenarios. The Root Inport Mapper tool uses scenarios to save a snapshot of the current state of the imported and mapped signals in an MLDATX file. A scenario file contains information about the:

  • Location of signal files (MAT-file or Microsoft® Excel® files)

  • Location of the model

  • Map mode

  • Mapping options

  • Mapped state

When sharing scenario files, include the scenario file and signal files (MAT-file or Microsoft Excel. Place the signal files in the last known location (where you used the Root Inport Mapper tool most recently) or the MATLAB® path.

Open Scenarios

To open an existing scenario, click Open. If there are unsaved changes, the Save Changes dialog appears.

Click Yes, No, or Cancel. For more information on your options, see Open.

Save Scenarios

When the Save icon turns blue or when the model name in the title bar is has an asterisk (*), you can save a scenario.

  1. On the Root Inport Mapper toolbar, select Save > Save As.

  2. In the Save As dialog box, browse to a writable folder, specify a scenario file name, and then click Save.

    • To save the signals and the scenario file, click Yes.

      If a MAT-file is already associated with the scenario, the tool appends the base workspace variables to this file.

Save a scenario to an existing file (the file from which the scenario was last loaded):

  1. On the Root Inport Mapper tool toolbar, click Save.

  2. Browse to the .mldatx file in which to save the scenario, and then click Save.

    If you have not saved the signals from the scenario, the tool prompts you to save the signals to a MAT-file.

    GoalAction

    Overwrite the existing .mldatx file.

    Yes

    Exit the dialog box. The tool does not save the scenario.

    No

Open Existing Scenarios

You can open previously saved scenario files in one of the following ways:

  • Double-click the previously saved scenario file (*.mldatx). The Root Inport Mapper tool opens and loads the model. Alternatively, right-click the file and select Open.

    • When loading scenario files, the tool looks for the associated model and MAT-file or Microsoft Excel file in the last known location, and then looks on the MATLAB path. If the tool cannot find the model or signal files in these two locations, an error occurs.

    • If the previously saved scenario has mapped signals, when you open the scenario, the tool applies the mapping. Also, the tool adds the signals to the base workspace so that you can simulate the model.

  • Open the Root Inport Mapper tool for the model, click Open, and select the previously saved scenario file.

If the model is already open, the new scenario overwrites the existing scenario for the model. If there are unsaved changes in the open scenario, respond to the prompt.

GoalClick

Save the existing scenario and associated data before loading the new scenario.

Yes

Open the new scenario without saving the existing scenario. This option also removes the data in the existing scenario.

No

Work with Multiple Scenarios

You can open and work with multiple scenario files simultaneously. Working with multiple scenario files lets you view, edit, group, and nest multiple scenario files. Use multiple scenario files to test more complex systems with interrelated components.

As you open each multiple scenario, the Root Inport Mapper tool adds its data set to the SCENARIO DATASET section. If the scenario contains only signals, convert the signals to the Simulink.SimulationData.Dataset format:

  1. To convert the signals to a Simulink.SimulationData.Dataset format, use the convertToSLDataset function.

  2. Link to the new data set. You do not need to reopen the scenario.

See Also

Related Topics