sltest.testsequence.setScenarioControlSource - Set source controlling Test Sequence active scenario - MATLAB (original) (raw)
Main Content
Set source controlling Test Sequence active scenario
Since R2020b
Syntax
Description
sltest.testsequence.setScenarioControlSource([blockPath](#mw%5Fe0515b07-b8ea-48c6-8b4a-c1ab73439001%5Fsep%5Fshared-blockPath),[scenarioControlSource](#mw%5F399f4cd3-a6cf-47e2-86e1-bf269366ac26))
sets the source, specified by scenarioControlSource
, that controls the active scenario for the Test Sequence block specified by blockPath
.
Examples
Set the Test Sequence block in thesltestRollRefTestExample
model to use scenarios. Set the source that controls the active scenario for the Test Sequence block in thesltestRollRefTestModel
to the workspace. Close the model without saving it.
openExample('sltestRollRefTestExample');
sltest.testsequence.useScenario... ('sltestRollRefTestExample/Test Sequence',... 'Scenario_1');
sltest.testsequence.activateScenario... ('sltestRollRefTestExample/Test Sequence',... 'Scenario_1');
sltest.testsequence.setScenarioControlSource... ('sltestRollRefTestExample/Test Sequence',... sltest.testsequence.ScenarioControlSource.Workspace);
close_system(Model,0)
Input Arguments
Active scenario control source, specified as either of these enumerated values:
- sltest.testsequence.ScenarioControlSource.Block — The active scenario is controlled by setting it in the Test Sequence block.
- sltest.testsequence.ScenarioControlSource.Workspace — The active scenario is controlled by a workspace variable that specifies the index of the active scenario. The variable can be in the base workspace, model workspace, or data dictionary.
Version History
Introduced in R2020b