Main Content

sltest.testsequence.addScenario

Add new scenario to Test Sequence block

Description

example

sltest.testsequence.addScenario(blockPath,scenarioName) adds a new scenario with the name specified by scenarioName to the Test Sequence block specified by blockPath. The specified Test Sequence block must be in scenario mode and the name of the new scenario cannot already exist in the block. The new scenario is added after the last scenario in the block.

Examples

collapse all

Set the Test Sequence block in the sltestRollRefTestExample model to use scenarios. Then, add a new scenario named new_Scenario. Close the model without saving it.

Model = 'sltestRollRefTestExample';
load_system(Model);

sltest.testsequence.useScenario...
   ('sltestRollRefTestExample/Test Sequence',...
   'Scenario_1');

sltest.testsequence.addScenario...
   ('sltestRollRefTestExample/Test Sequence',...
   'new_Scenario');

close_system(Model,0)

Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a string or character vector.

Example: 'FanSpeedTestHarness/Test Sequence'

Name of the scenario, specified as a string or character vector.

Example: 'Name','Scenario_1'

Introduced in R2020b