bdeSaveDiagramAsImage
Takes diagram and saves it to filepath as an image. Can use types .png, .jpg, and .jpeg.
Syntax
bdeSaveDiagramAsImage(diagram, filepath, scaleFactor)
Inputs
- diagram
 - Diagram being saved.
 - filepath
 - Filepath that the diagram is being saved to as an image.
 - scaleFactor (optional)
 - The scale of which the image can be saved as.
 
Examples
diagram = bdeGetCurrentDiagram();
        bdeSaveDiagramAsImage(diagram, 'C:\Users\user\testing/test.jpg, 2)