Mark simulation run for overwrite


  • Simulink.sdi.setRunOverwrite(runID,overwrite)



Simulink.sdi.setRunOverwrite(runID,overwrite) marks a run identified by runID for overwriting in the Simulation Data Inspector with the next simulation run.


collapse all

This example shows how to mark a run for overwriting in the Simulation Data Inspector.

Open the sldemo_fuelsys model.

On the Simulink® Editor toolbar, click the Simulation Data Inspector button arrow and select Send Logged Workspace Data to Data Inspector.

Simulate the model.

Open the Simulation Data Inspector.

At the MATLAB® Command Window, create a runID variable that uses the value of the Run ID for a run. You can find the Run ID for a run using the function Simulink.sdi.getRunIDByIndex.

runID = 1;

Set the overwrite condition to true.

In the Simulation Data Inspector, you can see the run is now marked to overwrite during the next simulation.

Simulate sldemo_fuelsys.

In the Simulation Data Inspector, the new simulation data replaces the previous run.

Related Examples

Input Arguments

collapse all

Run ID, a unique number identifying a run in the Simulation Data Inspector, specified as an integer.

The run overwrite setting, specified as a Boolean value. When set to true, the next simulation overwrites the run.

Example: Simulink.sdi.setRunOverwrite(1,true);


In the Simulation Data Inspector, select a run in the Runs pane and then click Overwrite on the Visualize tab.

Introduced in R2011b

Was this topic helpful?