Main Content

getLegendSnapshotImage

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

Image snapshot of schedule diagram legend

Since R2024b

Syntax

path = getLegendSnapshotImage(reporter,rpt)

Description

path = getLegendSnapshotImage(reporter,rpt) takes the snapshot of the schedule diagram legend specified by the slreportgen.report.ScheduleDiagram reporter, reporter, and the report, rpt, into which the diagram is added. The method creates an image file and returns the path of that file. This method gives you access to the image file so you can place it in 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 ScopeSnapshot LegendScaling 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 a 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");
getLegendSnapshotImage(reporter,rpt)

Name of the report to which to add the legend 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