Main Content

getSnapshotImage

Class: slreportgen.report.ScheduleDiagram
Namespace: slreportgen.report

Image snapshot of schedule diagram

Since R2024b

Syntax

path = getSnapshotImage(reporter,rpt)

Description

path = getSnapshotImage(reporter,rpt) takes a snapshot of the schedule diagram specified by the slreportgen.report.ScheduleDiagram reporter (reporter). The method generates an image file and returns the path to that file. rpt specifies the report in to which to add the schedule diagram snapshot. You can add the created image to specific locations of the report, such as on a title page. By changing the report layout and then adding this image, you can control the image layout.

Note

If you use this method, set the ScheduleDiagram Scaling property to "custom". If you use "auto" scaling, the image does not scale to fit on the page.

Input Arguments

expand all

Schedule diagram reporter, specified as slreportgen.report.ScheduleDiagram object. For example,

openExample("ex_engine_speed_control_system")
rpt = slreportgen.report.Report
reporter = slreportgen.report.ScheduleDiagram...
     ("ex_engine_speed_control_system");
getSnapshotImage(reporter,rpt)

Name of the report to which to add the snapshot, specified as a slreportgen.report.Report object.

Output Arguments

expand all

Location of snapshot image file, returned as a string. The location is a temporary folder that is deleted when the report is closed. To retain the folder, set the Debug property of slreportgen.report.Report.

Version History

Introduced in R2024b