Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Saving a chart
  • Backup in WMF format
  • Differences between grDestinationWMF and grSaveWMF
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Saves a chart that was drawn beforehand in WMF format.
// Saves the chart named CHART_MyChart in the "C:\Charts\Chart.WMF" file
grSaveWMF(CHART_MyChart, "C:\Charts\Chart.WMF")
<Result> = grSaveWMF(<Chart name> , <WMF file name>)
<Result>: Boolean
  • True if the chart was saved,
  • False otherwise.
<Chart name>: Control name or character string
Name of the chart to be used. This name corresponds to:
  • the chart name defined through programming with grCreate.
  • the name of the Chart control in the window, page or report editor.
<WMF file name>: Character string
Name and full path of the WMF file to create. The file extension is mandatory. This WMF file is created when grSaveWMF is called. The file is overwritten and re-created if it already existed.

Saving a chart

  • To save a chart, the chart must have been drawn beforehand (grDraw). The modifications performed since the last call to grDraw will be ignored.
  • The default size of the image is set to 639 x 479. These dimensions are taken into account if the chart was never drawn or if it is not visible.
  • If the chart was created by grCreate, the dimensions can be specified with grWndSize.

Backup in WMF format

  • This file can be read by a tool that recognizes WMF format.
  • The size of the file is identical to the size of the destination (size of window size, control or file).
  • We recommend that you preview the chart before it is saved in a file.

Differences between grDestinationWMF and grSaveWMF

  • grDestinationWMF is used to define the destination for the next drawing of the chart. When grDraw is used, the chart will be drawn in the specified file and all the changes made since the chart was last drawn will be taken into account.
  • grSaveWMF is used to save the chart in a file in WMF format. The image saved corresponds to the chart during the last call to grDraw. The changes made to the chart since grDraw was last called will be ignored.
Component: wd290grf.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help