slreportgen.utils.getSlSfHandle
Get Simulink handle or Stateflow object
Description
returns the Simulink® or Stateflow® object handle of the input Simulink path, Simulink identifier (SID), or
Stateflow numeric ID.sisfhandle
= slreportgen.utils.getSlSfHandle(path_id
)
Examples
Obtain Simulink Model and Object Handles
openExample('f14') modelHandle = slreportgen.utils.getSlSfHandle('f14') blockHandle = slreportgen.utils.getSlSfHandle('f14/Controller') SIDHandle = slreportgen.utils.getSlSfHandle('f14:3')
modelHandle = 2.0001 blockHandle = 38.0001 SIDHandle = 6.0001
Obtain Stateflow Chart Handle
Run the following command to access the supporting files used in this example.
openExample('rptgenext/SimulinkReportGeneratorFilesExample');
load_system('slrgex_sf_car') chart = find(slroot, '-isa',... 'Stateflow.Chart','Name','shift_logic'); slreportgen.utils.getSlSfHandle(chart.Id)
This example returns the list of Stateflow chart properties to the workspace. The Stateflow handle is equivalent to the Stateflow object. To use a Stateflow handle, assign it to a variable.
Input Arguments
Output Arguments
Version History
Introduced in R2018b