Main Content



Element diagram snapshot image file location


path = getSnapshotImage(elemdiag,rpt)


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.


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,

rpt =;
eldiag =
     ("f14/Aircraft Dynamics Model");

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

Version History

Introduced in R2018b