Get the values of all RoadRunner scenario variables using MATLAB
Get All RoadRunner Scenario Variables Using MATLAB
roadrunner object, specifying the path to an existing
project. For example, this code shows the path to a project, on a Windows® machine, located at
"C:\RR\MyProject". This call
assumes that RoadRunner is installed in the default location, and returns an object,
rrApp, that provides functions for performing basic workflow tasks
such as opening, closing, and saving scenes and
rrApp = roadrunner(ProjectFolder="C:\RR\MyProject");
Open an existing scenario in the specified project by using the
openScenario function, specifying the
object and the specific scenario
filename that you want to open as
filename = "MyScenario.rrscenario";
Get the values of all variables from the scenario.
values = getAllScenarioVariables(rrApp);
rrApp — RoadRunner application
RoadRunner application associated with a project, specified as a
roadrunner object. This object provides functions
for performing common workflow tasks such as opening, closing, and saving scenes and
rrApp provides functions that support importing data from
files and exporting scenes to other formats from RoadRunner.
values — Values of scenario variables
Values of the scenario variables, returned as a structure array with these fields:
Name— Name of the variable.
Value— String value of the variable.
TypedValue— Value of the variable as displayed in RoadRunner, such as an integer or double. The
TypedValuefield is empty for unsupported variable types, such as an array.
Example: If the scenario contains a variable called
with a value of
getAllScenarioVariables(rrApp) returns a structure with a
'-90' and a
Introduced in R2023b