Simulink.sdi.getCurrentSimulationRun
Access data for in-progress or most recently completed simulation
Description
returns the runObj = Simulink.sdi.getCurrentSimulationRun(mdl)Simulink.sdi.Run object that corresponds to
the in-progress or most recently completed simulation of the model specified by
mdl. If you delete the Run object that corresponds to
the most recently completed simulation, the
Simulink.sdi.getCurrentSimulationRun function returns empty.
Examples
Input Arguments
Output Arguments
Tips
You can use the
Simulink.sdi.getCurrentSimulationRunfunction to access logged data in aStopFcnmodel callback function. Workspace variable data is not available when theStopFcncallback executes, but theRunobject is available because data streams to the Simulation Data Inspector.You can use the
Simulink.sdi.getCurrentSimulationRunfunction to analyze run data on parallel workers to determine whether to send the run data to the Simulation Data Inspector.
Version History
Introduced in R2020a