getSnapshotImage

Class: slreportgen.report.ElementDiagram
Package: slreportgen.report

Element diagram snapshot image file location

Syntax

path = getSnapshotImage(elemdiag,rpt)

Description

path = getSnapshotImage(elemdiag,rpt) generates the image of the element diagram this reporter would generate if it were added to the report (rpt). This method returns the path of the generated image. Use this method to take snapshots of element diagrams without having to add the ElementDiagram reporter to a report. For example, you can use this method to set the Image property of a TitlePage reporter to a snapshot of an element diagram.

Note

If you use this method, set the ElementDiagram 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

Element diagram reporter, specified as an ElementDiagram class object. For example,

load_system('f14')
rpt = slreportgen.report.Report;
eldiag = slreportgen.report.ElementDiagram...
     ("f14/Aircraft Dynamics Model");
getSnapshotImage(eldiag,rpt);

Report class object used to generate the diagram image

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