getSnapshotImage

Class: slreportgen.report.Diagram
Package: slreportgen.report

Diagram snapshot image file location

Syntax

path = getSnapshotImage(diag,rpt)

Description

path = getSnapshotImage(diag,rpt) takes the snapshot of the diagram specified by the slreportgen.report.Diagram reporter (diag). It creates an image file and returns the path of that file. rpt is the report into which the diagram is added. 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 Diagram Scaling property to custom or zoom. If you use auto scaling, the image does not scale to fit on the page.

Input Arguments

expand all

Dialog reporter, specified as the variable name of the Diagram class. For example,

rpt = slreportgen.report.Report
diag = slreportgen.report.Diagram...
     ("f14/Aircraft Dynamics Model");
getSnapshotImage(diag,rpt)

Name of the report into which the diagram will go, specified as the report variable name.

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.

Introduced in R2018b