SaveAsPNGFile

SaveAsPNGFile ( fileName ;​ fileFlag ;​ creatorType ;​ resolution )

Argument Type Range Default Note
fileName str 1..1000 (required) Max. 1000 chars.
fileFlag int 1..2 replace
creatorType str 4..4 "????" Ignored
resolution num 0.25..4 1
Examples

SaveAsPNGFile("Chart.png")

SaveAsPNGFile("Chart.png";​addCounter)

SaveAsPNGFile("Graphs/Graph_a.png")

SaveAsPNGFile("~/Desktop/plot_01.png";​replace;​;​2)

SaveAsPNGFile("~/Desktop/Plots/plot_01.png")

SaveAsPNGFile("/Volumes/Macintosh HD/users/jane/desktop/plot_01.png";​replace;​;​3.5)

SaveAsPNGFile("/C:/Users/john/desktop/plot_01.png";​replace;​;​3.5)

Description

Output functions make it possible to save a drawing in a file. The following formats are presently available:
macOS: BMP, GIF, JPEG, PDF, PNG, SVG, TIFF
Windows: BMP, EMF, GIF, JPEG, PDF, PNG, SVG, TIFF
Linux: PDF, PNG, SVG
By using the 1st argument fileName the name of the file including an optional file path is defined. The separator in the file path is a slash "/", with no space before and after the slash. Either a complete, absolute file path or only a relative path can be passed to SaveAsPNGFile(). The relative path refers to the folder in which the current FileMaker Pro database file is located. For more information, refer to File Path Syntax.
If a file with the same name already exists, the following options are available using the 2nd argument fileFlag:
If fileFlag = replace the file that already exists is overwritten (default).
If fileFlag = addCounter is set, a counter is added to the file name, e.g. drawing-1.png, drawing-2.png, and so on.
The 3rd argument creatorType is ignored in xmCHART 4 and higher and is only for compatibility with previous xmCHART versions.
The image resolution can be controlled by the last argument resolution.

For more information, refer to Export Images.

Scroll to Top