Main Content

Simulink.sdi.resetRunNamingRule

Revert the Simulation Data Inspector run naming rule to default

Description

Simulink.sdi.resetRunNamingRule resets the run naming rule the Simulation Data Inspector uses to assign a name to runs created through simulating a Simulink® model to its default 'Run <run_index>: <model_name>'.

example

Examples

collapse all

This example shows how to use the Simulation Data Inspector API to modify the Simulation Data Inspector run naming rule, check a run's name, reset the run naming rule to its default, and check the run naming rule.

% Load model
load_system('sldemo_fuelsys')

% Modify run naming rule
Simulink.sdi.setRunNamingRule('<model_name> Run <run_index>')

% Simulate system
sim('sldemo_fuelsys')

% Check run name
runIDs = Simulink.sdi.getAllRunIDs;
runID = runIDs(end);
run = Simulink.sdi.getRun(runID);
run.name
ans = 
'sldemo_fuelsys Run 1'
% Reset the run naming rule
Simulink.sdi.resetRunNamingRule

% Check run naming rule
Simulink.sdi.getRunNamingRule
ans = 
'Run <run_index>: <model_name>'

Alternatives

You can reset the run naming rule to its default using the Simulation Data Inspector UI. Use the Restore Defaults button on the New Run tab under Simulation Data Inspector Preferences.

Simulink.sdi.clearPreferences restores the run naming rule, along with all other Simulation Data Inspector preferences.

Version History

Introduced in R2015a