Main Content

slreportgen.utils.getDisplayIcon

Get Simulink or Stateflow icon file name

Description

displayIcon = slreportgen.utils.getDisplayIcon(obj) returns the file path of the icon image for the Simulink® or Stateflow® object,obj. The file path is relative to the MATLAB® root folder .

example

displayIcon = slreportgen.utils.getDisplayIcon(___,FullPath=pathOption) returns the full file of the icon image for the Simulink or Stateflow object, obj.

example

Examples

collapse all

openExample("sf_car")
chart = find(slroot,"-isa","Stateflow.Chart", ...
    Name="shift_logic");
iconPath = slreportgen.utils.getDisplayIcon(chart);
openExample("sf_car")
chart = find(slroot,"-isa","Stateflow.Chart", ...
    Name="shift_logic");
iconPath = slreportgen.utils.getDisplayIcon(chart,FullPath=true);

Input Arguments

collapse all

Simulink or Stateflow object, specified as a string or character array of its path or handle.

Option to include full file path to icon image, specified as true or false.

Output Arguments

collapse all

Icon image file path, returned as a character vector.

Version History

Introduced in R2018b