Simulink.sdi.setAutoArchiveMode

Specify whether the Simulation Data Inspector automatically archives simulation runs

Description

example

Simulink.sdi.setAutoArchiveMode(mode) configures the automatic archive behavior of the Simulation Data Inspector, according to mode. The Simulation Data Inspector automatically archives simulation runs when you specify mode as true. When you specify mode as false, the Simulation Data Inspector does not automatically archive.

Examples

collapse all

You can configure the Simulation Data Inspector to retain only the logged data for your current simulation. In iterative design and debugging workflows, this configuration helps prevent accumulation of unwanted logged data on disk. First, check the configuration of the Simulation Data Inspector archive. You can save the parameters to restore your preferences after you finish designing or debugging.

limit = Simulink.sdi.getArchiveRunLimit;
mode = Simulink.sdi.getAutoArchiveMode;

Set the archive limit to 0 and configure the Simulation Data Inspector to automatically archive simulation runs.

Simulink.sdi.setArchiveRunLimit(0)
Simulink.sdi.setAutoArchiveMode(true)

When you simulate your model, the Simulation Data Inspector deletes the previous run and updates the view to show signals in the current simulation.

When you finish designing or debugging your model, you can restore the Simulation Data Inspector archive back to its previous configuration.

Simulink.sdi.setArchiveRunLimit(limit)
Simulink.sdi.setAutoArchiveMode(mode)

Input Arguments

collapse all

Logical value that specifies whether the Simulation Data Inspector automatically archives simulation runs.

  • true — The Simulation Data Inspector automatically archives simulation runs.

  • false — The Simulation Data Inspector does not automatically archive simulation runs.

Example: false

Data Types: logical

Introduced in R2018b