Contenido principal

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.

Whether to include the full file path to the icon image, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Include the full file path to the icon image.

  • 0 (false) — Do not include the full file path to the icon image.

Output Arguments

collapse all

Icon image file path, returned as a character vector.

Version History

Introduced in R2018b