Documentation

Simulink.sdi.getRunNamingRule

Get the run naming rule for Simulation Data Inspector runs

Syntax

runNamingRule = Simulink.sdi.getRunNamingRule()

Description

example

runNamingRule = Simulink.sdi.getRunNamingRule() returns the run naming rule for Simulation Data Inspector runs.

Examples

collapse all

% Load the model
sldemo_absbrake;

% Save the prior run naming rule and set a new rule
runNamingRule = Simulink.sdi.getRunNamingRule();
Simulink.sdi.setRunNamingRule('My special simulation');

% Record logged signals and send them to the Simulation Data Inspector
set_param('sldemo_absbrake','InspectSignalLogs',1);

% Run the simulation
set_param('sldemo_absbrake','SimulationCommand','Start');

% Restore the previous run naming rule
Simulink.sdi.setRunNamingRule(runNamingRule);

% Open the Simulation Data Inspector to see the new run
Simulink.sdi.view;

Output Arguments

collapse all

Current Simulation Data Inspector run naming rule, returned as a character vector containing any of the run naming rule tokens <run_index>, <model_name>, <time_stamp>, <sim_mode>, or a custom run naming rule.

Introduced in R2015a

Was this topic helpful?